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" } */
10 int foo (int n
, int l
, int m
, int r
)
14 if (n
< 10 || m
> 100 || r
< 20 || l
)
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" } */
29 int foo_2 (int n
, int l
, int m
, int r
)
33 if (n
< 10 || m
> 100 || r
< 20 || l
)
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" } */