[patch, fortran] Fix PR 86111, ICE on invalid

Thomas Koenig tkoenig@netcologne.de
Sat Oct 6 17:53:00 GMT 2018


Hello world,

the attached patch fixes an ICE regression by issuing an error
when a clever combination of array constructors ends up
in gfc_arith_concat with mismatched types, before resultion
has a chance to report the error.

Regression-tested. OK for trunk?

Regards

	Thomas

2018-10-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/86111
	* gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
	* arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
	(gfc_arith_concat):  If the types of op1 and op2 are not
	character of if their kinds do not match, issue ARITH_WRONGCONCAT.

2018-10-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/86111
	* gfortran.dg/array_constructor_type_23.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 1455 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181006/20e218dd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: array_constructor_type_23.f90
Type: text/x-fortran
Size: 217 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181006/20e218dd/attachment-0001.bin>


More information about the Fortran mailing list