gcc/testsuite/gcc.target/i386/pr80173.c
raw| 1 | /* PR middle-end/80173 */ |
| 2 | /* { dg-do compile { target lp64 } } */ |
| 3 | /* { dg-options "-O2 -ffixed-xmm7" } */ |
| 4 | |
| 5 | typedef int V __attribute__ ((vector_size (2 * sizeof (int)))); |
| 6 | |
| 7 | struct U { V a; V b; }; |
| 8 | |
| 9 | int |
| 10 | foo (int i) |
| 11 | { |
| 12 | register struct U u asm ("xmm7") = {{-1, 0}, {-1, 0}}; |
| 13 | return u.b[i]; |
| 14 | } |
| 15 | |
| 16 | int |
| 17 | bar (int i) |
| 18 | { |
| 19 | register struct U u asm ("xmm7"); |
| 20 | u = (struct U) {{-1, 0}, {-1, 0}}; |
| 21 | return u.b[i]; |
| 22 | } |