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