gcc/testsuite/gcc.dg/bitint-128.c
raw| 1 | /* PR tree-optimization/124826 */ |
| 2 | /* { dg-do compile { target bitint } } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | |
| 5 | typedef float V __attribute__((vector_size (16 * sizeof (float)))); |
| 6 | |
| 7 | union { |
| 8 | #if __BITINT_MAXWIDTH__ >= 256 |
| 9 | _BitInt(256) b; |
| 10 | #endif |
| 11 | V v; |
| 12 | } u; |
| 13 | |
| 14 | void |
| 15 | foo (int c) |
| 16 | { |
| 17 | u.v -= c ? 0.f : 1.f; |
| 18 | #if __BITINT_MAXWIDTH__ >= 256 |
| 19 | u.b *= c; |
| 20 | #endif |
| 21 | } |
| 22 | |
| 23 | int |
| 24 | main () |
| 25 | { |
| 26 | foo (2); |
| 27 | } |