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