This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, gfortran] Improved patch for PR 16861
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>,patch <gcc-patches at gcc dot gnu dot org>,"'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Wed, 21 Sep 2005 22:39:51 +0200
- Subject: Re: [Patch, gfortran] Improved patch for PR 16861
- References: <432BDA19.3060301@wanadoo.fr> <43302DA5.2040304@wanadoo.fr>
Paul Thomas wrote:
> 2005-09-20 Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/16861
> * module.c (mio_component_ref): Return if the symbol is NULL
> and wait for another iteration during module reads.
> (mio_symtree_ref): Suppress the writing of contained symbols,
> when a symbol is available in the main namespace.
> (read_module): Restrict scope of special treatment of contained
> symbols to variables only and suppress redundant call to
> find_true_name.
This is ok. Except ...
> --- 3157,3173 ----
>
> sym = find_true_name (info->u.rsym.true_name, info->u.rsym.module);
>
> ! /* See if the symbol has already been loaded by a previous module.
> ! If so, we reference the existing symbol and prevent it from
> ! being loaded again. This should not happen if the symbol being
> ! read is an index for an assumed shape dummy array (ns != 1). */
>
> ! sym = find_true_name (info->u.rsym.true_name, info->u.rsym.module);
> !
> ! if (sym == NULL
> ! || (sym !=NULL
> ! && sym->attr.flavor == FL_VARIABLE
> ! && info->u.rsym.ns !=1))
sym != NULL is already implicit in the second condition, so you don't have to
check this.
- Tobi