blob: db5f3e0cadd18d9bbddc7db0f1aeacfd95c944c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/* { dg-do run } */
/* { dg-options "-fno-early-inlining" } */
extern void abort (void);
union U
{
int i;
_Bool b;
};
_Bool gb;
void __attribute__ ((noinline))
use_bool (union U u)
{
gb = u.b;
}
union U
bar (void)
{
union U u;
u.i = 0xFFFE;
return u;
}
union U __attribute__ ((noinline))
foo (void)
{
union U u,v;
u.b = 1;
use_bool (u);
u = bar ();
return u;
}
int main (int argc, char **argv)
{
union U u = foo ();
if (u.i != 0xFFFE)
abort ();
return 0;
}
|