This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33566] fortran : wrong rank of derived type parameters array components
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Sep 2007 15:48:17 -0000
- Subject: [Bug fortran/33566] fortran : wrong rank of derived type parameters array components
- References: <bug-33566-14266@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pault at gcc dot gnu dot org 2007-09-28 15:48 -------
It transpires that the fix that I used for use associated, derived type
parameters works here too:
Index: gcc/fortran/primary.c
===================================================================
*** gcc/fortran/primary.c (révision 128833)
--- gcc/fortran/primary.c (copie de travail)
*************** gfc_match_rvalue (gfc_expr **result)
*** 2148,2159 ****
if (sym->ts.is_c_interop || sym->ts.is_iso_c)
break;
! /* Variable array references to use associated derived type
! parameters cause all sorts of headaches in simplification.
! For this reason, we write the parameter to the module and
! treat them as variable references. */
! if (sym->value && sym->ts.type == BT_DERIVED
! && sym->attr.use_assoc && e->ref)
{
for (ref = e->ref; ref; ref = ref->next)
if (ref->type == REF_ARRAY)
--- 2148,2157 ----
if (sym->ts.is_c_interop || sym->ts.is_iso_c)
break;
! /* Variable array references to derived type parameters cause
! all sorts of headaches in simplification. For this reason,
! we treat them as variable references. */
! if (sym->value && sym->ts.type == BT_DERIVED && e->ref)
{
for (ref = e->ref; ref; ref = ref->next)
if (ref->type == REF_ARRAY)
I'll regtest and submit it.
Cheers
Paul.
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-09-26 19:12:48 |2007-09-28 15:48:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33566