[PATCH] PR fortran 88116,88467 -- Catch array constructor errors

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Dec 14 19:00:00 GMT 2018


The attached patch has been regression tested on
x86_64-*-freebsd.  It fixes to PR.  Both PR are related
to errors in array constructors.  PR fortran/88116 was not 
reporting an error on type mismatches with nested array
constructors.  PR fortran/88467 was silently accepting
a CHARACTER entity within nested array constructors.

OK to commit?

2018-12-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/88116
	PR fortran/88467
	* array.c (gfc_match_array_constructor): Check return value of
	gfc_convert_type().  Skip constructor elements with BT_UNKNOWN,
	which need to go through resolution.
	* intrinsic.c (gfc_convert_type_warn): Return early if the types
	martch (i.e., no conversion is required).
	* simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
	and return gfc_bad_expr.

2018-12-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/88116
	* gfortran.dg/pr88116_1.f90: New test.
	* gfortran.dg/pr88116_2.f90: Ditto.

	PR fortran/88467
	* gfortran.dg/pr88467.f90: New test.

-- 
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr88467.diff
Type: text/x-diff
Size: 2832 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181214/af47e6ca/attachment.bin>


More information about the Fortran mailing list