2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr42475.c
bloba5edffa78eba8e539d5f8db3955b547f603523da
1 /* PR rtl-optimization/42475 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 typedef struct { float x, y; } B;
6 typedef struct { float z; } C;
7 typedef struct { B b; C c; } D;
10 foo (float x, float y)
12 B b = { .x = x, .y = y };
13 return b;
17 bar (B b, B y)
19 return foo (y.x + b.x, b.y);
23 baz (D p)
25 D d = { };
26 B y = bar (foo (0, (p.c.z) / 2), d.b);
27 return y;