PR target/83368
[official-gcc.git] / gcc / testsuite / c-c++-common / Wduplicated-branches-11.c
blob70d86cf7f05f12a73d0aef3406d174811b30df63
1 /* PR c/64279 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wduplicated-branches" } */
5 int
6 f (int p)
8 if (p == 0)
10 p += 1, ++p;
12 else
14 p -= 1, ++p;
17 if (p == 1)
20 else
21 p++;
23 if (p == 2)
24 p++;
25 else
29 if (p == 3)
32 else
36 if (p == 4)
38 ++p;
39 return p;
41 else
43 p++;
44 return p;
47 if (p == 5)
48 ++p;
49 else
50 p++;
52 if (p == 6)
54 ++p;
55 ++p;
56 return p;
58 else
60 ++p;
61 return p;
64 if (p == 7)
66 ++p;
67 return p;
69 else
71 ++p;
72 ++p;
73 return p;