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/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20021113-1.c
blob
8226d3a85662ba610b955dbc47a8539da9412f73
1
/* { dg-require-effective-target alloca } */
2
3
/* This program tests a data flow bug that would cause constant propagation
4
to propagate constants through function calls. */
5
6
foo
(
int
*
p
)
7
{
8
*
p
=
10
;
9
}
10
11
main
()
12
{
13
int
*
ptr
=
alloca
(
sizeof
(
int
));
14
*
ptr
=
5
;
15
foo
(
ptr
);
16
if
(*
ptr
==
5
)
17
abort
();
18
exit
(
0
);
19
}