[Bug fortran/30420] IBCLR() fails to properly handle clearing the sign bit.
brooks at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jan 10 05:46:00 GMT 2007
------- Comment #1 from brooks at gcc dot gnu dot org 2007-01-10 05:46 -------
Subject: Bug 30420
Author: brooks
Date: Wed Jan 10 05:46:13 2007
New Revision: 120634
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120634
Log:
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.
Added:
trunk/gcc/testsuite/gfortran.dg/ishft_1.f90
- copied unchanged from r120594,
trunk/gcc/testsuite/gfortran.dg/ishft.f90
trunk/gcc/testsuite/gfortran.dg/ishft_2.f90
trunk/gcc/testsuite/gfortran.dg/ishft_3.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/ishft.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/chkbits.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30420
More information about the Gcc-bugs
mailing list