1 /* PR c/60036 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wconversion" } */
4 
5 extern int fn (void);
6 
7 void
foo(int i)8 foo (int i)
9 {
10   unsigned int f = 9;
11 
12   /* Don't warn on these.  */
13   f += fn () || i;
14   f += fn () && i;
15   f += ! fn ();
16   f -= fn () == i;
17   f |= fn () != i;
18   f &= fn () < i;
19   f ^= fn () > i;
20   f &= fn () <= i;
21   f ^= fn () >= i;
22 
23   /* But warn on the following.  */
24   f += fn (); /* { dg-warning "conversion" } */
25   f += fn () | i; /* { dg-warning "conversion" } */
26   f += fn () & i; /* { dg-warning "conversion" } */
27   f += fn () ^ i; /* { dg-warning "conversion" } */
28 }
29