repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR middle-end/77674
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
Wimplicit-fallthrough-12.c
blob
91a68ab0771f511e92ba8b7213f335b22702a362
1
/* PR c/7652 */
2
/* { dg-do compile } */
3
/* { dg-options "-Wimplicit-fallthrough -O2" } */
4
5
/* Don't let optimizations preclude the warning. */
6
7
extern
void
bar
(
int
);
8
9
void
10
f
(
int
i
)
11
{
12
switch
(
i
)
13
{
14
case
1
:
15
if
(
i
>
1
)
16
bar
(
1
);
17
else
18
goto
D
;
19
break
;
20
case
2
:
21
bar
(
2
);
/* { dg-warning "statement may fall through" } */
22
D
:
23
default
:
24
bar
(
33
);
25
}
26
}