1 // RUN: %clang_builtins %s %librt -o %t && %run %t
2 // REQUIRES: librt_has_negvdi2
9 // Effects: aborts if -a overflows
11 COMPILER_RT_ABI di_int
__negvdi2(di_int a
);
13 int test__negvdi2(di_int a
)
15 di_int x
= __negvdi2(a
);
18 printf("error in __negvdi2(0x%llX) = %lld, expected %lld\n",
25 // if (test__negvdi2(0x8000000000000000LL)) // should abort
27 if (test__negvdi2(0x0000000000000000LL
))
29 if (test__negvdi2(0x0000000000000001LL
))
31 if (test__negvdi2(0x0000000000000002LL
))
33 if (test__negvdi2(0x7FFFFFFFFFFFFFFELL
))
35 if (test__negvdi2(0x7FFFFFFFFFFFFFFFLL
))
37 if (test__negvdi2(0x8000000000000001LL
))
39 if (test__negvdi2(0x8000000000000002LL
))
41 if (test__negvdi2(0xFFFFFFFFFFFFFFFELL
))
43 if (test__negvdi2(0xFFFFFFFFFFFFFFFFLL
))