[Patch, fortran] PR33566 - fortran : wrong rank of derived type parameters array components

Paul Richard Thomas paul.richard.thomas@gmail.com
Sat Sep 29 11:19:00 GMT 2007


:ADDPATCH fortran:

This one is really annoying because I fixed the problem for use
associated derived type parameters just recently - I never even
thought to check that parameters in the same scope as the expression
worked OK.  Anyway, this works by removing the check for use
association in the previous patch.  I also let the simplifier do its
thing for full array references; otherwise, any array reference to a
derived type parameter is treated as a variable expression.

The testcase is the reporter's, with the addition of a second
previously failing expression.

Bootstrapped and regtested on x86_ia64/FC5 - OK for trunk?

Paul

2007-09-29  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/33566
	* primary.c (gfc_match_rvalue): Make all expressions with array
	references to structure parameters into variable expressions.

2007-09-29  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/33566
	* gfortran.dg/derived_comp_array_ref_5.f90: New test.

-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 2515 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070929/4338ae6f/attachment.bin>


More information about the Gcc-patches mailing list