(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
Wduplicated-branches-12.c
       1  /* PR c/64279 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-Wduplicated-branches" } */
       4  
       5  void
       6  f (int i)
       7  {
       8    if (i) /* { dg-warning "this condition has identical branches" } */
       9      return 0;
      10  /* { dg-warning ".return. with a value" "" { target c } .-1 } */
      11  /* { dg-error "return-statement with a value" "" { target c++ } .-2 } */
      12    else
      13     return 0;
      14  /* { dg-warning ".return. with a value" "" { target c } .-1 } */
      15  /* { dg-error "return-statement with a value" "" { target c++ } .-2 } */
      16  }