gcc/testsuite/gcc.c-torture/compile/pr40432.c
raw| 1 | /* Test that SRA produces valid gimple when handling both type punning by means |
| 2 | of VCE and creating an access to a union. */ |
| 3 | |
| 4 | union U { |
| 5 | struct something *sth; |
| 6 | void *nothing; |
| 7 | }; |
| 8 | |
| 9 | void |
| 10 | foo (union U *target, void *p) |
| 11 | { |
| 12 | union U u; |
| 13 | |
| 14 | u.nothing = p; |
| 15 | *target = u; |
| 16 | return; |
| 17 | } |