gcc/testsuite/gcc.c-torture/execute/pr105613.c
raw| 1 | /* PR target/105613 */ |
| 2 | /* { dg-do run { target int128 } } */ |
| 3 | |
| 4 | typedef unsigned __int128 __attribute__((__vector_size__ (16))) V; |
| 5 | |
| 6 | void |
| 7 | foo (V v, V *r) |
| 8 | { |
| 9 | *r = v != 0; |
| 10 | } |
| 11 | |
| 12 | int |
| 13 | main () |
| 14 | { |
| 15 | V r; |
| 16 | foo ((V) {5}, &r); |
| 17 | if (r[0] != ~(unsigned __int128) 0) |
| 18 | __builtin_abort (); |
| 19 | foo ((V) {0x500000005ULL}, &r); |
| 20 | if (r[0] != ~(unsigned __int128) 0) |
| 21 | __builtin_abort (); |
| 22 | foo ((V) {0}, &r); |
| 23 | if (r[0] != 0) |
| 24 | __builtin_abort (); |
| 25 | return 0; |
| 26 | } |