chkbits.f90
937 Bytes
-
re PR fortran/30381 ([4.1 only] ISHFTC() constant folding is broken.) · f1dcb9bf
PR 30381 PR 30420 * fortran/simplify.c (convert_mpz_to_unsigned): New function. (convert_mpz_to_signed): New function, largely based on twos_complement(). (twos_complement): Removed. (gfc_simplify_ibclr): Add conversions to and from an unsigned representation before bit-twiddling. (gfc_simplify_ibset): Same. (gfc_simplify_ishftc): Add checks for overly large constant arguments, only check the third argument if it's present, carry over high bits into the result as appropriate, and perform the final conversion back to a signed representation using the correct sign bit. (gfc_simplify_not): Removed unnecessary masking. * testsuite/gfortran.dg/ * chkbits.f90: Added IBCLR tests; test calls for different integer kinds. * ishft.f90: Renamed to ishft_1.f90... * ishft_1.f90: ...Renamed from ishft.f90. * ishft_2.f90: New test. * ishft_3.f90: New test. From-SVN: r120634
Brooks Moses committed