1 /* { dg-do run } */ 2 /* { dg-options "-O3" } */ 3 /* { dg-add-options bind_pic_locally } */ 4 5 struct S 6 { 7 int a, b, c; 8 }; 9 10 volatile int g; 11 12 static void __attribute__ ((noinline, noclone)) bar(struct S ** p)13bar (struct S **p) 14 { 15 g = 5; 16 }; 17 18 static void __attribute__ ((noinline)) foo(struct S * p)19foo (struct S *p) 20 { 21 int i = p->a; 22 if (i != 1) 23 __builtin_abort (); 24 bar (&p); 25 } 26 27 int main(int argc,char * argv[])28main (int argc, char *argv[]) 29 { 30 struct S s; 31 s.a = 1; 32 s.b = 64; 33 s.c = 32; 34 foo (&s); 35 36 return 0; 37 } 38 39