OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2010-05-02 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr36373-5.c
1
/* { dg-do run } */
2
/* { dg-options "-fno-tree-sra" } */
3
4
extern void abort (void);
5
struct Foo {
6
int *p;
7
int *q;
8
};
9
struct Foo __attribute__((noinline))
10
bar(int *p)
11
{
12
struct Foo f;
13
f.p = p;
14
return f;
15
}
16
void __attribute__((noinline))
17
foo(struct Foo f)
18
{
19
*f.p = 0;
20
}
21
int main()
22
{
23
int a, b;
24
a = 0;
25
b = 1;
26
struct Foo f;
27
f = bar (&b);
28
f.q = &a;
29
foo(f);
30
if (b != 0)
31
abort ();
32
return 0;
33
}
34