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
/
20030913-1.c
blob
5e33f50f560ccab6a0e5c15f515446fc595e762e
1
/* Assignments via pointers pointing to global variables were being killed
2
by SSA-DCE. Test contributed by Paul Brook <paul@nowt.org> */
3
4
int
glob
;
5
6
void
7
fn2
(
int
**
q
)
8
{
9
*
q
= &
glob
;
10
}
11
12
void
test
()
13
{
14
int
*
p
;
15
16
fn2
(&
p
);
17
18
*
p
=
42
;
19
}
20
21
int
main
()
22
{
23
test
();
24
if
(
glob
!=
42
)
abort
();
25
exit
(
0
);
26
}