1 // RUN: %clang_builtins %s %librt -o %t && %run %t
2 // REQUIRES: librt_has_negvsi2
9 // Effects: aborts if -a overflows
11 COMPILER_RT_ABI si_int
__negvsi2(si_int a
);
13 int test__negvsi2(si_int a
)
15 si_int x
= __negvsi2(a
);
18 printf("error in __negvsi2(0x%X) = %d, expected %d\n", a
, x
, expected
);
24 // if (test__negvsi2(0x80000000)) // should abort
26 if (test__negvsi2(0x00000000))
28 if (test__negvsi2(0x00000001))
30 if (test__negvsi2(0x00000002))
32 if (test__negvsi2(0x7FFFFFFE))
34 if (test__negvsi2(0x7FFFFFFF))
36 if (test__negvsi2(0x80000001))
38 if (test__negvsi2(0x80000002))
40 if (test__negvsi2(0xFFFFFFFE))
42 if (test__negvsi2(0xFFFFFFFF))