Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr101938.c
blob82777554eaf7b1948ac4c2698b5eb374bb28cdc4
1 // { dg-do run }
2 // { dg-require-effective-target lp64 }
3 // { dg-options "-O2 -fwrapv" }
5 typedef long long int int64;
6 #define INT64CONST(x) (x##LL)
7 /* -9223372036854775808ULL */
8 #define INT64_MIN (-INT64CONST(0x7FFFFFFFFFFFFFFF) - 1)
10 static void __attribute__((noipa)) foo(int64 arg1, int64 arg2) {
11 int64 a1 = -arg1;
12 int64 a2 = (arg2 < 0) ? arg2 : -arg2;
14 if (a1 > a2) {
15 int64 swap = arg1;
16 arg1 = arg2;
17 arg2 = swap;
20 if (arg1 == INT64_MIN && arg2 == -1) return;
22 __builtin_abort();
25 int main() {
26 foo(-1, INT64_MIN);
27 return 0;