aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2019-11-25 19:50:38 +0000
committerHarald Anlauf <anlauf@gcc.gnu.org>2019-11-25 19:50:38 +0000
commitc5144966742c1586b10a73fa833a660049d3ea0f (patch)
tree1de6d12de7635f0c7afd1e78256de1f9c9f5d7ef /gcc/fortran/simplify.c
parent7def9bd7cd9637ec31496febc217ca039de11746 (diff)
downloadgcc-c5144966742c1586b10a73fa833a660049d3ea0f.zip
gcc-c5144966742c1586b10a73fa833a660049d3ea0f.tar.gz
gcc-c5144966742c1586b10a73fa833a660049d3ea0f.tar.bz2
re PR fortran/92629 (internal compiler error: in convert_mpz_to_unsigned, at fortran/simplify.c:173)
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. PR fortran/92629 * gfortran.dg/pr92629.f90: New testcase. From-SVN: r278699
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r--gcc/fortran/simplify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index b48bf01..b02c549 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -169,8 +169,10 @@ convert_mpz_to_unsigned (mpz_t x, int bitsize)
}
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);
}
}