Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / c-c++-common / Wduplicated-branches-3.c
blobe1883843d543798769b62e3c6e284ec12b9d635e
1 /* PR c/64279 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wduplicated-branches" } */
5 extern int *g;
7 void
8 f (short int i)
10 if (i == 0) /* { dg-warning "this condition has identical branches" } */
11 *g = (int) i;
12 else
13 *g = (int) i;
15 if (i == 1)
16 *g = (unsigned char) i;
17 else
18 *g = (signed char) i;