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