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
/
pr58941.c
blob
c0eea073165cf3f9969a397894d90eec381caf4c
1
/* { dg-do run } */
2
3
extern
void
abort
(
void
);
4
5
typedef
struct
{
6
int
msgLength
;
7
unsigned char
data
[
1000
];
8
}
SMsg
;
9
10
typedef
struct
{
11
int
dummy
;
12
int
d
[
0
];
13
}
SData
;
14
15
int
condition
=
3
;
16
17
int
main
()
18
{
19
SMsg msg
;
20
SData
*
pData
= (
SData
*)(
msg
.
data
);
21
unsigned int
i
=
0
;
22
for
(
i
=
0
;
i
<
1
;
i
++)
23
{
24
pData
->
d
[
i
] =
0
;
25
if
(
condition
&
1
)
26
pData
->
d
[
i
] |=
0x55
;
27
if
(
condition
&
2
)
28
pData
->
d
[
i
] |=
0xaa
;
29
}
30
if
(
pData
->
d
[
0
] !=
0xff
)
31
abort
();
32
return
0
;
33
}