gcc/testsuite/gcc.target/avr/torture/shift-r-i24.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-additional-options { -std=gnu99 -fwrapv } } */ |
| 3 | |
| 4 | #define OP >> |
| 5 | #define BITS 24 |
| 6 | __extension__ typedef __int24 T; |
| 7 | |
| 8 | #include "test-shift.h" |
| 9 | |
| 10 | const AS T vals[] = |
| 11 | { |
| 12 | 1, 0x01a273, 0x7f324b, 0x7e801, 0x765432 |
| 13 | }; |
| 14 | |
| 15 | int main (void) |
| 16 | { |
| 17 | for (int i = 0; i < ARRAY_SIZE (vals); ++i) |
| 18 | { |
| 19 | testx (vals[i]); |
| 20 | testx (-vals[i]); |
| 21 | } |
| 22 | testx ((T) 0x800000); |
| 23 | |
| 24 | return 0; |
| 25 | } |