OSDN Git Service

PR 30381
authorbrooks <brooks@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jan 2007 05:46:13 +0000 (05:46 +0000)
committerbrooks <brooks@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jan 2007 05:46:13 +0000 (05:46 +0000)
commitff35fcd7d43c2587840a75d8dc0da647428a6557
tree23ccb0abe794245c81bad05c2acfc7144098c78a
parentcf31d486006967b4a5100a6e2f51247db6d6cd49
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120634 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/simplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/chkbits.f90
gcc/testsuite/gfortran.dg/ishft_1.f90 [moved from gcc/testsuite/gfortran.dg/ishft.f90 with 100% similarity]
gcc/testsuite/gfortran.dg/ishft_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/ishft_3.f90 [new file with mode: 0644]