PR tree-optimization/86401
[official-gcc.git] / gcc / testsuite / c-c++-common / Wduplicated-branches-14.c
blob81be1ac39020c600046064b9bc745a4e8445e7e3
1 /* PR c/85094 */
2 /* { dg-do compile } */
3 /* { dg-options "-O1 -Wduplicated-branches -g" } */
5 extern int g;
7 void
8 foo (int r)
10 if (r < 64)
11 g -= 48;
12 else if (r < 80) /* { dg-warning "this condition has identical branches" } */
13 g -= 64 - 45;
14 else
15 g -= 80 - 61;