Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / gcc.dg / 20021029-1.c
blobd8dd8c015d5cf6c6a14a161363998b1a3080acf8
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-options "-O2 -fpic -mpt-fixed" { target sh64*-*-* } } */
6 /* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */
8 int foo (int a)
10 static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
11 void *p = &&l1 + ar[a];
12 goto *p;
13 l1:
14 return 1;
15 l2:
16 return 2;