1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* PR c/85094 */ /* { dg-do compile } */ /* { dg-options "-O1 -Wduplicated-branches -g" } */ extern int g; void foo (int r) { if (r < 64) g -= 48; else if (r < 80) /* { dg-warning "this condition has identical branches" } */ g -= 64 - 45; else g -= 80 - 61; }