This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/44196] lto1: ICE: tree check: expected field_decl, have type_decl in gimple_types_compatible_p, at gimple.c:3597
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2010 15:13:47 -0000
- Subject: [Bug lto/44196] lto1: ICE: tree check: expected field_decl, have type_decl in gimple_types_compatible_p, at gimple.c:3597
- References: <bug-44196-19203@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from rguenther at suse dot de 2010-05-19 15:13 -------
Subject: Re: lto1: ICE: tree check: expected field_decl, have
type_decl in gimple_types_compatible_p, at gimple.c:3597
On Wed, 19 May 2010, hubicka at ucw dot cz wrote:
> ------- Comment #7 from hubicka at ucw dot cz 2010-05-19 15:11 -------
> Subject: Re: lto1: ICE: tree check: expected field_decl,
> have type_decl in gimple_types_compatible_p, at gimple.c:3597
>
> > I suppose this is an alias but we fail to clear its body/block tree. We end
> > up refering to some TYPE_DECL in its BLOCK tree from somewhere else
> > (but we don't stream that function decl in the end).
>
> For aliases we never clear their body/blocks because they are never finalized.
> If this is same_body_alias produced by C++ FE, I guess it should be responsible
> for giving us a decl alone. Overall C++ FE is leaking quite a few bodies/trees
> in unfinalized decls. I used to have aptch to clear them out but it was
> rejected
> for PCH reasons.
Ok, so my patch might be even correct as we are reaching the odd
TYPE_DECL via streaming block abstract origin from a different function.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44196