gcc/testsuite/gcc.target/i386/sse2-pr112816.c
raw| 1 | /* PR target/112816 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -msse2" } */ |
| 4 | |
| 5 | #define N 4 |
| 6 | struct S { float x[N]; }; |
| 7 | struct T { int x[N]; }; |
| 8 | |
| 9 | struct T |
| 10 | foo (struct S x) |
| 11 | { |
| 12 | struct T res; |
| 13 | for (int i = 0; i < N; ++i) |
| 14 | res.x[i] = __builtin_signbit (x.x[i]) ? -1 : 0; |
| 15 | return res; |
| 16 | } |