gcc/testsuite/c-c++-common/torture/pr124086-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "" } */ |
| 3 | /* PR tree-optimization/124086 */ |
| 4 | |
| 5 | /* Disable for non power of 2 long double as a vector of that is not supported. */ |
| 6 | #if (__SIZEOF_LONG_DOUBLE__ & -__SIZEOF_LONG_DOUBLE__) == __SIZEOF_LONG_DOUBLE__ |
| 7 | |
| 8 | typedef __attribute__((__vector_size__(2*sizeof(long double)))) int V; |
| 9 | int j; |
| 10 | |
| 11 | void |
| 12 | foo() |
| 13 | { |
| 14 | V v = (V){0, -0xd}; |
| 15 | _Complex long double t = *(_Complex long double *)&v; |
| 16 | j = __real__ t; |
| 17 | } |
| 18 | |
| 19 | #endif |