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.dg/torture/builtin-math-7.c: Add -mieee for sh*-*-* targets.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr36373-2.c
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
}