Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pred-8_b.c
blobd9c3c42c30268c5fac9ecd6ac2c2265e27ea6712
1 /* { dg-do compile } */
2 /* ??? Jump threading makes a mess of the logical-op-non-short-circuit=0 case
3 so force it our way. */
4 /* { dg-options "-Wuninitialized -O2 --param logical-op-non-short-circuit=1" } */
6 int g;
7 void bar();
8 void blah(int);
10 int foo (int n, int l, int m, int r)
12 int v;
14 if (n < 10 || m > 100 || r < 20 || l)
15 v = r;
17 if (m) g++;
18 else bar();
20 if ( n < 10 || m > 100 || r < 20 )
21 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
23 if ( n < 10 || m > 100 || r < 10 )
24 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
26 return 0;
29 int foo_2 (int n, int l, int m, int r)
31 int v;
33 if (n < 10 || m > 100 || r < 20 || l)
34 v = r;
36 if (m) g++;
37 else bar();
39 if ( n < 10 || m > 100 || r < 20 )
40 blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
42 if ( n < 10 || m > 100 || r < 30 )
43 blah(v); /* { dg-warning "uninitialized" "warning" } */
45 return 0;