gcc/testsuite/gcc.c-torture/compile/pr110705-1.c
raw| 1 | /* PR ipa/110705 */ |
| 2 | |
| 3 | /* We used to ICE in gimplify_modify_expr due to |
| 4 | the gimplifier not handling VCE between an struct |
| 5 | and an integer type. */ |
| 6 | |
| 7 | struct a { |
| 8 | long b; |
| 9 | }; |
| 10 | union d { |
| 11 | struct a b; |
| 12 | int e; |
| 13 | }v; |
| 14 | long c; |
| 15 | int f; |
| 16 | static void g(union d h, long i) { |
| 17 | while (1) |
| 18 | switch (c) |
| 19 | case 4: |
| 20 | if (h.e) |
| 21 | c = 4; |
| 22 | } |
| 23 | void j(union d *h) { |
| 24 | if (f) |
| 25 | g(*h, h->b.b); |
| 26 | } |
| 27 | void k() { union d *h = &v; j(h); } |