aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wduplicated-branches-14.c
blob: 81be1ac39020c600046064b9bc745a4e8445e7e3 (plain)
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;
}