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" } } */ 6 foo(int a)7int foo (int a) 8 { 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; 16 } 17