[patch, fortran] PR34556 Rejects valid with bogus error message: parameter initalization

Jerry DeLisle jvdelisle@verizon.net
Mon Jan 14 09:41:00 GMT 2008


Hi,

This was tricky to find.  gfc_simplify_reshape was failing with the function MAX 
in an argument.

The attached patch fixes this problem by checking for EXPR_FUNCTION in the 
incoming array argument constructors.  The gfc_get_array_element was failing 
when attempting to get an element using expand_constructor which can not expand 
or otherwise simplify the MAX intrinsic.

Regression tested on x86-64.  New test case developed from the one in the PR.

OK for trunk?

Regards,

Jerry

2008-01-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/34556
	* simplify.c (gfc_simplify_reshape): Add checks for expression type ==
	EXPR_FUNCTION in reshape array argument constructors.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr34556.diff
Type: text/x-patch
Size: 1300 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080114/0d6c9ed8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_2.f90
Type: text/x-fortran
Size: 1181 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080114/0d6c9ed8/attachment-0001.bin>


More information about the Fortran mailing list