This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Attachment: t.diff.txt
Description: Text document



ChangeLog:

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

Attachment: t.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]