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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
vrp05.c
blob
f7ba16c20bbc2216076ff70c0022f39b2350d8a5
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fno-thread-jumps -fno-ipa-vrp" } */
3
4
5
inline
int
ten
()
6
{
7
return
10
;
8
}
9
inline
int
zero
()
10
{
11
return
0
;
12
}
13
14
int
15
foo
(
int
k
,
int
j
)
16
{
17
if
(
k
>=
ten
())
18
{
19
if
(
j
>
k
)
20
{
21
/* We should fold this to if (1). */
22
if
(
j
>
zero
())
23
return
j
;
24
}
25
}
26
27
return
j
+
1
;
28
}
29
30
/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */