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
/
torture
/
pr17526.c
1
/* { dg-do run } */
2
/* { dg-options "-fno-pcc-struct-return" { target i?86-*-* } } */
3
4
void abort(void);
5
6
typedef struct { int i; } A;
7
8
A __attribute__((noinline))
9
foo(void)
10
{
11
A a = { -1 };
12
return a;
13
}
14
15
void __attribute__((noinline))
16
bar(A *p)
17
{
18
*p = foo();
19
}
20
21
int main(void)
22
{
23
A a;
24
bar(&a);
25
if (a.i != -1) abort();
26
return 0;
27
}