blob: d6d59b481aaca261f5b17da179c6878b894a2ccf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* { dg-do compile } */
/* { dg-options "-O2 -Wunreachable-code" } */
extern void foo (void);
extern void baz (void);
void bar (int i)
{
if (i < 2)
{
baz ();
return;
}
else
{
if (i >= 4 && i <= 5)
foo ();
return;
}
baz (); /* { dg-warning "will never be executed" "" } */
baz ();
baz ();
}
|