[PATCH] Fix PR fortran/23635, ichar and derived types

Andrew Pinski pinskia@physics.uc.edu
Fri Oct 21 16:19:00 GMT 2005


The problem here is that for derived types, we have an EXPR_VARIABLE 
but we also
have the length for the access already.  The way to fix this is that we 
need to
check the length only if we know that we don't have references.  This 
patch
fixes it by moving the code which checks the length to the spot where 
we know
that there are no REF_SUBSTRING.

OK for 4.0 and the mainline? Tested on x86_64-linux-gnu with no 
regressions.

Note this is a regression from 4.0.0.

Thanks,
Andrew Pinski

ChangeLog:
	* check.c (gfc_check_ichar_iachar): Move the code around so
	that the check on the length is after check for references.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t.diff.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051021/f5bf163f/attachment.txt>
-------------- next part --------------


ChangeLog:

	* gfortran.dg/ichar_1.f90: Add tests for derived types.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t.diff.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051021/f5bf163f/attachment-0001.txt>


More information about the Fortran mailing list