1 /* { dg-do compile } */ 2 /* { dg-options "-Wuninitialized -Wno-attributes -O2" } */ 3 4 int g; 5 int bar(); 6 int blah(int); 7 void t(int); 8 9 static int 10 __attribute__((always_inline)) foo(int n,int * v,int r)11foo (int n, int* v, int r) 12 { 13 int flag = 0; 14 if (r > n) 15 { 16 *v = bar(); 17 flag = 1; 18 } 19 20 if (n > g) 21 g++; 22 else 23 bar(); 24 25 return flag; 26 } 27 28 int a[100]; 29 int b[100]; blah(int n)30int blah(int n) 31 { 32 int i; 33 for (i = 0 ; i < n; i++) 34 { 35 int v; 36 if (!foo (n, &v, b[i])) 37 return 0; 38 t (v); /* { dg-bogus "uninitialized" "bogus warning" } */ 39 } 40 return 1; 41 } 42 43