[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / c-c++-common / Wduplicated-branches-4.c
blob79af549386636d55187c322eade7c82e7fb86dc6
1 /* PR c/64279 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wduplicated-branches" } */
5 extern int *g;
6 extern const int *q;
8 void
9 f (int i)
11 int j;
13 if (i == 0)
14 for (j = 0; j < 10; j++)
15 ++*g;
16 else
17 for (j = 0; j < 10; j++)
18 ++*g;
20 if (i == 1)
22 int i = 10;
23 *g = i;
25 else
27 int i = 10;
28 *g = i;
31 if (i == 3)
32 q = (const int []){1};
33 else
34 q = (const int []){1};