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