This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, gfortran] Improved patch for PR 16861


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]