blob: 076edb46ee53884435e5863c1d1edd4ff3c8a7f2 (
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
|
/* PR middle-end/41123 */
/* { dg-do compile } */
/* { dg-options "-O2 -fno-strict-aliasing" } */
struct S { char a, b, c, d, e, f, g, h; };
struct T { int a, b; };
struct S
f1 (float _Complex x)
{
return *(struct S *) & x;
}
int
f2 (float _Complex x)
{
struct S f = f1 (x);
return f.b;
}
struct T
f3 (float _Complex x)
{
return *(struct T *) & x;
}
int
f4 (float _Complex x)
{
struct T f = f3 (x);
return f.a;
}
int
f5 (float _Complex x)
{
struct T f = f3 (x);
return f.b;
}
struct T
f6 (float _Complex x)
{
struct T f = f3 (x);
return f;
}
|