[gfortran,patch] PR 24266: IO to/from arrays that are components of derived types
Andrew Pinski
pinskia@physics.uc.edu
Mon Jan 30 23:30:00 GMT 2006
>
> --a8Wt8u1KmwUX3Y2C
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
>
> Here's a simple patch to fix PR 24266: the current check in
> trans-io.c (set_internal_unit) if the internal file is an array
> works only for "plain" variables, not derived type components.
>
> Tested on Linux/x86, mainline and 4.1. Ok to commit?
>
>
> Erik
>
>
> 2005-01-31 Erik Edelmann <eedelman@gcc.gnu.org>
>
> PR fortran/24266
> * trans-io.c (set_internal_unit): Check the rank of the
> expression node itself instead of its symbol.
>
>
> 2005-01-31 Erik Edelmann <eedelman@gcc.gnu.org>
>
> PR fortran/24266
> * gfortran.dg/arrayio_derived_2.f90: New.
>
> --a8Wt8u1KmwUX3Y2C
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: attachment; filename="24266.diff"
>
> Index: gcc/fortran/trans-io.c
> ===================================================================
> --- gcc/fortran/trans-io.c (revision 110406)
> +++ gcc/fortran/trans-io.c (working copy)
> @@ -599,7 +599,7 @@ set_internal_unit (stmtblock_t * block,
> }
>
> /* Character array. */
> - else if (e->symtree && (e->symtree->n.sym->as->rank > 0))
> + else if (e->rank > 0)
> {
> se.ss = gfc_walk_expr (e);
This seems obvious. Also it is okay from my point of view.
-- Pinski
More information about the Gcc-patches
mailing list