1 /* { dg-do run } */ 2 /* { dg-options "-O -fdump-tree-optimized" } */ 3 4 extern void link_error (void); 5 extern void abort (void); 6 7 int *t; g(int * a)8int __attribute__((noinline)) g(int *a) 9 { 10 t = a; 11 *a = 2; 12 } 13 f(int * a)14void __attribute__((noinline)) f(int *a) 15 { 16 int b; 17 b = 1; 18 g(&b); 19 b = 2; 20 *a = 1; 21 if (b != 2) 22 link_error(); 23 } 24 main(void)25int main(void) 26 { 27 int t; 28 f(&t); 29 if (t != 1) 30 abort (); 31 return 0; 32 } 33 34 /* { dg-final { scan-tree-dump-not "link_error" "optimized" } } */ 35