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
Daily bump.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
pr80898-2.c
blob
cb4799c5ced211b6b5089d0f29526fa4e9558ce6
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
4
struct
S0
5
{
6
unsigned
a
:
15
;
7
int
b
;
8
int
c
;
9
};
10
11
struct
S1
12
{
13
struct
S0 s0
;
14
int
e
;
15
};
16
17
struct
Z
18
{
19
char
c
;
20
int
z
;
21
}
__attribute__
((
packed
));
22
23
union
U
24
{
25
struct
S1 s1
;
26
struct
Z z
;
27
};
28
29
30
int
__attribute__
((
noinline
,
noclone
))
31
return_zero
(
void
)
32
{
33
return
0
;
34
}
35
36
volatile
union
U gu
;
37
struct
S0 gs
;
38
39
int
__attribute__
((
noinline
,
noclone
))
40
check_outcome
()
41
{
42
if
(
gs
.
a
!=
6
43
||
gs
.
b
!=
80000
)
44
__builtin_abort
();
45
}
46
47
int
48
main
(
int
argc
,
char
*
argv
[])
49
{
50
union
U u
;
51
struct
S1 m
;
52
struct
S0 l
;
53
54
if
(
return_zero
())
55
u
.
z
.
z
=
20000
;
56
else
57
{
58
u
.
s1
.
s0
.
a
=
6
;
59
u
.
s1
.
s0
.
b
=
80000
;
60
u
.
s1
.
e
=
2
;
61
62
m
=
u
.
s1
;
63
m
.
s0
.
c
=
0
;
64
l
=
m
.
s0
;
65
gs
=
l
;
66
}
67
68
gu
=
u
;
69
check_outcome
();
70
return
0
;
71
}