gcc/testsuite/gcc.dg/pr94574.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -w -Wno-psabi" } */ |
| 3 | |
| 4 | typedef unsigned int v4si __attribute__((vector_size(16))); |
| 5 | typedef unsigned int v2si __attribute__((vector_size(8))); |
| 6 | |
| 7 | /* The aliasing is somewhat dubious here, but it must compile. */ |
| 8 | |
| 9 | v2si |
| 10 | foo (v4si v) |
| 11 | { |
| 12 | v2si res; |
| 13 | *(v4si *) &res = v; |
| 14 | return res; |
| 15 | } |