Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pred-6_c.c
blobf60868dad237865a57bd58ab5839602ea45e608b
2 /* { dg-do compile } */
3 /* { dg-options "-Wuninitialized -O2" } */
5 int g;
6 void bar();
7 void blah(int);
9 int foo (int n, int l, int m, int r)
11 int v;
13 if (n > 10)
14 if (l)
15 v = r;
17 if (m) g++;
18 else bar();
20 if ( (n > 10) && l)
21 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
23 if (l)
24 if (n > 12)
25 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
27 return 0;
30 int foo_2 (int n, int l, int m, int r)
32 int v;
34 if (n > 10)
35 if (l)
36 v = r;
38 if (m) g++;
39 else bar();
41 if (n > 8 )
42 if (l)
43 blah (v); /* { dg-warning "uninitialized" "warning" } */
45 return 0;