gcc/testsuite/gcc.target/arc/tmac-4.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-skip-if "" { ! { clmcpu } } } */ |
| 3 | /* { dg-options "-O3 -mbig-endian -mcpu=hs38" } */ |
| 4 | |
| 5 | struct a {}; |
| 6 | struct b { |
| 7 | int c; |
| 8 | int d; |
| 9 | }; |
| 10 | |
| 11 | struct { |
| 12 | struct a e; |
| 13 | struct b f[]; |
| 14 | } g; |
| 15 | short h; |
| 16 | |
| 17 | extern void bar (int *); |
| 18 | |
| 19 | int foo(void) |
| 20 | { |
| 21 | struct b *a; |
| 22 | for (;;) |
| 23 | { |
| 24 | a = &g.f[h]; |
| 25 | bar(&a->d); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | /* { dg-final { scan-assembler "dmach" } } */ |