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
Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
pr28410.c
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
4
extern void abort(void);
5
struct Bar { int p; };
6
struct Foo { struct Bar *p; };
7
struct Bar p0 = { 0 };
8
struct Bar p1 = { 1 };
9
void bar(struct Foo *f)
10
{
11
f->p = &p0;
12
}
13
int foo(struct Foo *f)
14
{
15
f->p->p = 1;
16
bar(f);
17
return f->p->p;
18
}
19
int main()
20
{
21
struct Foo f;
22
f.p = &p1;
23
if (foo(&f) != 0)
24
abort ();
25
return 0;
26
}