[PATCH] PR fortran/82049 -- resolve a charlen if possible

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Feb 7 02:17:00 GMT 2018


The attached patch fixes PR fortran/82049.  Prior to this
patch, gfortran was fouling up the resolution of the charlen
expression in the testcase.  The immediately tries to resolve
the length while parsing the type-spec.

While here, I've introduced an optimization that causes
gfc_match_type_spec() to return early if the gfortran isn't
going to be getting a type-spec.  This is done be peeking
at the next character, if it is in [a-z], the we don't have
a type spec.  OK to commit?


2018-02-06  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/82049
	* match.c (gfc_match_type_spec): If the charlen is non-NULL, then
	try to resolve it.  While here return early if possible.

2018-02-06  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/82049
	* gfortran.dg/assumed_charlen_parameter.f90: New test.


-- 
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr82049.diff
Type: text/x-diff
Size: 1526 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180207/61b9b9d2/attachment.bin>


More information about the Fortran mailing list