repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr17526.c
blob
c5a97685eb57d02a60197e9f4dda7f6993cc0b81
1
/* { dg-do run } */
2
/* { dg-options "-fno-pcc-struct-return" { target i?86-*-* x86_64-*-* } } */
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
}