https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92629
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to anlauf from comment #1) > Confirmed. > > Tentative fix: > > Index: gcc/fortran/simplify.c > =================================================================== > --- gcc/fortran/simplify.c (Revision 278629) > +++ gcc/fortran/simplify.c (Arbeitskopie) > @@ -170,7 +170,8 @@ 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); > + if (flag_range_check != 0) > + gcc_assert (mpz_scan1 (x, bitsize-1) == ULONG_MAX); > } > } I was looking at a fix in compare_bitwise(), but it did not work as intended. One thing I added was a warning that bit wise comparisons involving a negative integer is processor dependent.