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