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

Jerry DeLisle jvdelisle@verizon.net
Wed Jan 16 21:22:00 GMT 2008


Paul Richard Thomas wrote:
> Jerry,
> 
> I suggest that you make a local, renamed  copy of gfc_is_constant_expr
> and put the exclusion of functions in that.  That'll make the patch
> look a sight neater.  Also, I guess that other transformational
> functions need the same treatment?
> 

Here is revised patch with Paul's suggestions.  I would like to get this in 
before looking at other transformational functions.  Test cases attached.  I 
will probably combine these into one. The reshape_3.f90 is Paul's example in 
this thread.

Regression tested on X86-84.

OK for trunk?

Jerry

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

	PR fortran/34556
	* simplify.c (is_constant_array_expr): New static function that returns
	true if the given expression is an array and is constant.
	(gfc_simplify_reshape): Use new function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr34556-b.diff
Type: text/x-patch
Size: 1687 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080116/ea4275e1/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/20080116/ea4275e1/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_3.f90
Type: text/x-fortran
Size: 1038 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080116/ea4275e1/attachment-0002.bin>


More information about the Fortran mailing list