gcc/testsuite/gcc.dg/torture/pr116278-run-2.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-require-effective-target int32 } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | |
| 5 | #include <stdint.h> |
| 6 | |
| 7 | int16_t b[1]; |
| 8 | int16_t *d = b; |
| 9 | int64_t c; |
| 10 | |
| 11 | int main() { |
| 12 | b[0] = -40; |
| 13 | uint32_t t = (uint32_t)d[0]; |
| 14 | |
| 15 | c = (t < 0xFFFFFFF6u ? t : 0xFFFFFFF6u) + 9; |
| 16 | |
| 17 | if (c != 4294967265) |
| 18 | __builtin_abort (); |
| 19 | } |