gcc/testsuite/gcc.dg/torture/pr78546-1.c
raw| 1 | /* PR rtl-optimization/78546 */ |
| 2 | /* { dg-do run { target int128 } } */ |
| 3 | |
| 4 | typedef unsigned __int128 u128; |
| 5 | u128 b; |
| 6 | |
| 7 | static inline u128 |
| 8 | foo (u128 p1) |
| 9 | { |
| 10 | p1 += ~b; |
| 11 | return -p1; |
| 12 | } |
| 13 | |
| 14 | int |
| 15 | main () |
| 16 | { |
| 17 | asm volatile ("" : : : "memory"); |
| 18 | u128 x = foo (~0x7fffffffffffffffLL); |
| 19 | if (x != 0x8000000000000001ULL) |
| 20 | __builtin_abort (); |
| 21 | return 0; |
| 22 | } |