1 /* { dg-do compile } */
2 /* { dg-options "-Wlogical-op" } */
8 if (x
&& x
) {} /* { dg-warning "logical .and. of equal expressions" } */
9 if (x
&& (int) x
) {} /* { dg-warning "logical .and. of equal expressions" } */
10 if ((int) x
&& x
) {} /* { dg-warning "logical .and. of equal expressions" } */
11 if ((int) x
&& (int) x
) {} /* { dg-warning "logical .and. of equal expressions" } */
18 if (x
|| x
) {} /* { dg-warning "logical .or. of equal expressions" } */
19 if (x
|| (int) x
) {} /* { dg-warning "logical .or. of equal expressions" } */
20 if ((int) x
|| x
) {} /* { dg-warning "logical .or. of equal expressions" } */
21 if ((int) x
|| (int) x
) {} /* { dg-warning "logical .or. of equal expressions" } */