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
Merge from mainline.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr20100.c
blob
988fbda6429db437a2eb03cc2a78a9e76ca3985d
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
4
int
func_pure
(
void
)
__attribute__
((
pure
));
5
void
func_other
(
int
);
6
int
global_int
;
7
void
abort
();
8
void
func_other
(
int
a
)
9
{
10
if
(
a
!=
global_int
)
11
abort
();
12
global_int
++;
13
}
14
15
int
func_pure
(
void
)
16
{
17
return
global_int
;
18
}
19
20
int
21
func_loop
(
int
arg
)
22
{
23
// global_int ++;
24
while
(
arg
--)
25
func_other
(
func_pure
());
26
}
27
28
int
main
(
void
)
29
{
30
func_loop
(
10
);
31
return
0
;
32
}