2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20021029-1.c
blob468f9c055f45a37eb257ad0c5be17078f231aa71
1 /* Test whether difference of local labels doesn't force
2 variables into writable sections. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2 -fpic" } */
5 /* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */
7 int foo (int a)
9 static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
10 void *p = &&l1 + ar[a];
11 goto *p;
12 l1:
13 return 1;
14 l2:
15 return 2;