]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / uninit-pr19430-O0.c
1 /* { dg-do compile } */
2 /* { dg-options "-O0 -Wuninitialized" } */
3 extern int bar (int);
4 extern void baz (int *);
5
6 int
7 foo (int i)
8 {
9 int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } 9 } */
10
11 if (bar (i)) {
12 baz (&j);
13 } else {
14 }
15
16 return j;
17 }
18
19 int foo2( void ) {
20 int rc;
21 return rc; /* { dg-warning "'rc' is used uninitialized in this function" } */
22 *&rc = 0;
23 }
24
25 extern int printf(const char *, ...);
26 void frob(int *pi);
27
28 int main(void)
29 {
30 int i;
31 printf("i = %d\n", i); /* { dg-warning "'i' is used uninitialized in this function" } */
32 frob(&i);
33
34 return 0;
35 }
36
37 void foo3(int*);
38 void bar3(void) {
39 int x;
40 if(x) /* { dg-warning "'x' is used uninitialized in this function" } */
41 foo3(&x);
42 }