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, fortran] PR24092 and PR24158 - recursive derived types


On Sat, Oct 08, 2005 at 10:59:26AM +0200, Paul Thomas wrote:
> 
> 2005-10-07  Paul Thomas  <pault@gcc.gnu.org>
> 
> PR fortran/24092
> 	* trans-types.c (gfc_get_derived_type): Remove assert that
> 	backend_decl not be NULL and replace it with if to cope
> 	with values returned by recursion.

This is broken.

>     /* Now we have the final fieldlist.  Record it, then lay out the
> --- 1456,1466 ----
>   
>         DECL_PACKED (field) |= TYPE_PACKED (typenode);
>   
> !       /* It can happen, when a derived type recurses through a
> ! 	 pointer component, that this backend_decl will now have
> ! 	 been built.  */
> !       if (c->backend_decl == NULL);

Is the terminating semicolon suppose to be there?  The if () is
a NOP.

This is also rejected by patch.

> ! 	c->backend_decl = field;
>       }
>   

-- 
Steve


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