This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix AND, OR, and XOR
On Tue, May 13, 2008 at 07:51:08PM -0700, Jerry DeLisle wrote:
> Steve Kargl wrote:
> >See the attached patch. It's self explanatory.
> >
> >2008-05-13 Steven G. Kargl, <kargl@comcast.net>
> > * gfortran.dg/and_or_xor.f90: New test
> >
> > * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
> > gfc_simplify_xor):
> > Don't range check logical results.
> >
> >
> Looks OK to commit if regression tested.
>
I no longer have commit access. I did not do a regression
test. I did do 'make pdf' and checked gfortran.pdf was
correctly generated. I doubt you even need to do a regression
test. gfc_simplify_{and,or,xor} are only used with the
G77 compatiblity intrinsics AND(), OR(), XOR(). Only
gnu_logical_2.f90 uses these intrinsics, and the simplification
routines will never be called by that test.
mobile:kargl[202] cat > and_or_xor.f90
! { dg-do run }
program L
if (and(.TRUE._1, .TRUE._1) .neqv. .true.) call abort
if (or(.TRUE._1, .TRUE._1) .neqv. .true.) call abort
if (xor(.TRUE._1, .TRUE._1) .neqv. .false.) call abort
end program L
mobile:kargl[203] gfc -o z and_or_xor.f90
and_or_xor.f90:6.13:
end program L
1
Internal Error at (1):
gfc_range_check(): Bad type
gfc is 4.2.3. So, this problem is at least 4.2.3, 4.3.x and
4.4.0.
--
Steve