view gcc/testsuite/c-c++-common/Wduplicated-branches-14.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* 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;
}