1 /* PR tree-optimization/55060 - False un-initialized variable warnings
2 { dg-do compile }
3 { dg-options "-O1 -Wuninitialized" } */
4
a(int * i)5 static void a(int *i) { }
b(int p)6 static void b(int p) { }
foo(void)7 int foo(void) {
8 int i;
9 a(&i);
10 b(i); // { dg-bogus "\\\[-Wuninitialized" }
11 return 0;
12 }
13
c(int * i)14 static void c(int *i) { }
15 extern void d(int p);
bar(void)16 int bar(void) {
17 int i;
18 c(&i);
19 d(i); // { dg-warning "\\\[-Wuninitialized" }
20 return 0;
21 }
22
23 extern void e(int *i);
f(int p)24 static void f(int p) {};
baz(void)25 int baz(void) {
26 int i;
27 e(&i);
28 f(i); // { dg-bogus "\\\[-Wuninitialized" }
29 return 0;
30 }
31