+2019-11-25 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/92629
+ * simplify.c (convert_mpz_to_unsigned): Skip assert for argument
+ range when -fno-range-check is specified.
+
2019-11-25 Mark Eggleston <mark.eggleston@codethink.com>
Jim MacArthur <jim.macarthur@codethink.co.uk>
}
else
{
- /* Confirm that no bits above the signed range are set. */
- gcc_assert (mpz_scan1 (x, bitsize-1) == ULONG_MAX);
+ /* Confirm that no bits above the signed range are set if we
+ are doing range checking. */
+ if (flag_range_check != 0)
+ gcc_assert (mpz_scan1 (x, bitsize-1) == ULONG_MAX);
}
}
+2019-11-25 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/92629
+ * gfortran.dg/pr92629.f90: New testcase.
+
2019-11-25 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/diagnostic/base-operand-non-pointer-1.C: New.
--- /dev/null
+! { dg-do run }
+! { dg-options "-fno-range-check" }
+!
+! Test the fix for PR92629.
+program bge_tests
+ if (bge (huge (1_1), 128_1)) stop 1
+ if (bge ( 128_1 , 255_1)) stop 2
+ if (bge (huge (1_2), 32768_2)) stop 3
+ if (bge (huge (1_4), 2147483648_4)) stop 4
+ if (bge (huge (1_8), 9223372036854775808_8)) stop 5
+end program