Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pred-7_d.c
blob06111731a630d92dca2eb2f507439b3690ff23ff
2 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
3 /* { dg-options "-Wuninitialized -O2 -mbranch-cost=0" } */
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 || l)
14 v = r;
16 if (m) g++;
17 else bar();
19 if ( n && l)
20 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
22 if ( n )
23 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
25 if ( l )
26 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
28 return 0;
31 int foo_2 (int n, int l, int m, int r)
33 int v;
35 if (n || l)
36 v = r;
38 if (m) g++;
39 else bar();
41 if ( n && l)
42 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
44 if ( n )
45 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
47 if (m || l)
48 blah (v); /* { dg-warning "uninitialized" "warning" } */
50 if ( l )
51 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
53 return 0;