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
/
pr101170.c
blob
fc8106206b6db6a1b83df3236f5ffb62cca256ba
1
/* PR middle-end/101170 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -g" } */
4
5
#include <stdarg.h>
6
7
struct
S
{
int
a
;
int
b
[
4
]; }
s
;
8
va_list
ap
;
9
int
i
;
10
long long
l
;
11
12
struct
S
13
foo
(
int
x
)
14
{
15
struct
S a
= {};
16
do
17
if
(
x
)
18
return
a
;
19
while
(
1
);
20
}
21
22
__attribute__
((
noipa
))
void
23
bar
(
void
)
24
{
25
for
(;
i
;
i
++)
26
l
|=
va_arg
(
ap
,
long long
) <<
s
.
b
[
i
];
27
if
(
l
)
28
foo
(
l
);
29
}
30
31
void
32
baz
(
int
v
, ...)
33
{
34
va_start
(
ap
,
v
);
35
bar
();
36
va_end
(
ap
);
37
}