1 /* { dg-do link } */ 2 /* { dg-options "-O2" } */ 3 4 void link_failure (void); 5 6 struct a 7 { 8 char a1; 9 }; 10 11 int *aa; 12 g(int * a)13void g(int *a) 14 { 15 aa = a; 16 *a = 2; 17 } 18 t(int i,struct a * b)19int t(int i, struct a *b) 20 { 21 g(&i); 22 b->a1 = 1; 23 i = 2; 24 if (b->a1 != 1) 25 link_failure (); 26 } main(void)27int main(void) 28 { 29 struct a b; 30 t(1, &b); 31 return 0; 32 } 33 34 35