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
2015-05-04 Sandra Loosemore <sandra@codesourcery.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr36373-2.c
blob
2653182a52cf09f65f789dc818cc9c49be823719
1
/* { dg-do run } */
2
/* { dg-options "-fno-tree-sra" } */
3
4
extern
void
abort
(
void
);
5
struct
Foo
{
6
int
*
p
;
7
};
8
struct
Bar
{
9
struct
Foo
*
x
;
10
int
*
q
;
11
};
12
struct
Foo
__attribute__
((
noinline
))
13
bar
(
int
*
p
)
14
{
15
struct
Foo f
;
16
f
.
p
=
p
;
17
return
f
;
18
}
19
void
__attribute__
((
noinline
))
20
foo
(
struct
Foo f
)
21
{
22
*
f
.
p
=
0
;
23
}
24
int
main
()
25
{
26
int
a
,
b
;
27
a
=
0
;
28
b
=
1
;
29
struct
Bar f
;
30
struct
Foo g
=
bar
(&
b
);
31
f
.
x
= &
g
;
32
f
.
q
= &
a
;
33
foo
(*
f
.
x
);
34
if
(
b
!=
0
)
35
abort
();
36
return
0
;
37
}