gcc/testsuite/gcc.dg/torture/pr83847.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-additional-options "-march=bdver4" { target i?86-*-* x86_64-*-* } } */ |
| 3 | |
| 4 | typedef struct { |
| 5 | struct { |
| 6 | int a; |
| 7 | int b; |
| 8 | } c; |
| 9 | } * d; |
| 10 | typedef struct { |
| 11 | unsigned e; |
| 12 | d f[]; |
| 13 | } g; |
| 14 | g h; |
| 15 | d *k; |
| 16 | int i(int j) { |
| 17 | if (j) { |
| 18 | *k = *h.f; |
| 19 | return 1; |
| 20 | } |
| 21 | return 0; |
| 22 | } |
| 23 | int l; |
| 24 | int m; |
| 25 | int n; |
| 26 | d o; |
| 27 | void p() { |
| 28 | for (; i(l); l++) { |
| 29 | n += o->c.a; |
| 30 | m += o->c.b; |
| 31 | } |
| 32 | } |