1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* PR tree-optimization/118207 */ /* { dg-do compile } */ /* { dg-options "-O2" } */ struct A { unsigned char a; }; struct B { struct A b; }; static const unsigned char c[] = { #embed __FILE__ }; struct B d; void foo () { const struct B *t = (const struct B *) &c; d.b = t->b; }