Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr60036.c
blob07eb6ace983a2482bf948057d891476be9b0ebf5
1 /* PR c/60036 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wconversion" } */
5 extern int fn (void);
7 void
8 foo (int i)
10 unsigned int f = 9;
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;
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" } */