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: Fix PR45586 (type confusion ICEs), take 3


Hello,

On Thursday 17 February 2011 13:59:25 Michael Matz wrote:
> Hello,
> 
> On Tue, 15 Feb 2011, Michael Matz wrote:
> > On Mon, 14 Feb 2011, Dominique Dhumieres wrote:
> > > Michael,
> > > 
> > > With the patch take2, the test for pr47455 in comment #5
> > 
> > > ( http://gcc.gnu.org/bugzilla/attachment.cgi?id=23136 ) gives an ICE:
> > I see.  The underlying reason is that the type I construct a copy of
> > isn't yet layed out.  I'll fix that.
> 
> Was a bit more involved than I thought.  During construction of real class
> types (where members are function pointers, and those functions themself
> take a this argument of pointer to class) new fields are added to the
> record_type when we've already created the nonrestrict variant.  For that
> I've split out the field mirroring and use it in case we don't find the
> field we're searching for.  Additionally there was some problem with me
> using copy_node, I'm now using the more proper build_variant_type_copy.
> Otherwise patch is unchanged.
> 
> Regstrapped on x86_64-linux, no regressions.  I'm assuming that the
> testcase for pr47455 (typebound_proc_20.f90) goes into the tree when that
> bug is fixed for good, so I'm not adding it for this one.
Given how much time some of the bugs need to get fixed, I'm a bit inclined to 
commit the testcase as compile only test now. What do others think ?
(It's not much of a problem as long as we have Dominique around ;) )

> 
> Okay for trunk?
> 
> 
> Ciao,
> Michael.
> --
> fortran/
>         PR fortran/45586
>         * gfortran.h (struct gfc_component): Add norestrict_decl member.
>         * trans.h (mirror_fields): Declare function.
>         (struct lang_type): Add nonrestricted_type member.
>         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
>         parent type.
>         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
To respect the coding conventions, every non-static function should have a 
gfc_ prefix. That is, it should be:
        * trans-types.c (gfc_mirror_fields, nonrestricted_type): New. 

with callers updated (of course).

OK with that change.

Thanks again
Mikael



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