Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / c-c++-common / Wlogical-op-2.c
blob5d8a3fcd91da61d4961661fd5074914643f75b1e
1 /* PR c/80525 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wlogical-op" } */
5 int
6 fn (int a, int b)
8 if ((a + 1) && (a + 1)) /* { dg-warning "logical .and. of equal expressions" } */
9 return a;
10 if ((a + 1) || (a + 1)) /* { dg-warning "logical .or. of equal expressions" } */
11 return b;
12 return -1;