1 /* { dg-do compile { target ia32 } } */ 2 /* { dg-require-effective-target pie } */ 3 /* { dg-options "-O2 -fPIE" } */ 4 /* { dg-final { scan-assembler-not "GOTOFF," } } */ 5 6 typedef struct S 7 { 8 int a; 9 int sum; 10 int delta; 11 } S; 12 13 S gs; global_opt(int max)14int global_opt (int max) 15 { 16 while (gs.sum < max) 17 gs.sum += gs.delta; 18 return gs.a; 19 } 20