blob: 87a94f5bf315f78bbc4438e27674f33f940c92fd (
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
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-fre1" } */
struct inn
{
int val;
};
struct biggerstruct
{
int a, b;
};
union foo
{
struct inn inn;
struct biggerstruct baz;
} *fooptr;
struct bar
{
union foo foo;
int val2;
} *barptr;
int
test ()
{
union foo foo;
foo.inn.val = 0;
barptr->val2 = 123;
*fooptr = foo;
return barptr->val2;
}
/* { dg-final { scan-tree-dump-times "return 123" 1 "fre1"} } */
|