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 tree-optimization/81303
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
vrp103.c
blob
2d63fc89f7a69243b9a3276f1a6de48b391b922f
1
/* PR tree-optimization/18046 */
2
/* { dg-options "-O2 -fdump-tree-vrp" } */
3
/* { dg-final { scan-tree-dump-times "baz \\(0\\);" 4 "vrp1" } } */
4
5
void
foo
(
void
);
6
void
bar
(
void
);
7
void
baz
(
int
);
8
9
void
10
test
(
int
i
)
11
{
12
switch
(
i
)
13
{
14
case
1
:
15
case
2
:
16
case
3
:
17
foo
();
18
break
;
19
case
5
:
20
bar
();
21
break
;
22
default
:
23
/* These tests should be folded to 0, resulting in 4 calls of baz(0). */
24
baz
(
i
==
1
);
25
baz
(
i
==
2
);
26
baz
(
i
==
3
);
27
baz
(
i
==
5
);
28
break
;
29
}
30
}