This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Fix PR lto/52178 (continued)
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 May 2012 13:11:04 +0200
- Subject: Re: [patch] Fix PR lto/52178 (continued)
- References: <email@example.com>
On Fri, May 25, 2012 at 12:27 PM, Eric Botcazou <firstname.lastname@example.org> wrote:
> This is a follow-up to PR lto/52178: there are more "type mismatch in component
> reference" issues related to variably_modified_type_p when you try to build
> the gnattools with -flto:
> ?1. Instances of a record type with fixed size at top level aren't merged if
> ? ? it has a field with self-referential size because variably_modified_type_p
> ? ? returns true for the latter. ?I think the fix is straightforward: return
> ? ? false for the special PLACEHOLDER_EXPR marker that is set in this case by
> ? ? free_lang_data_in_one_sizepos.
> ?2. Twin variably_modified_type_p qualified union types that belong to two
> ? ? different functions may appear in the same COMPONENT_REF expression,
> ? ? leading to a type mismatch. ?This occurs after a variably_modified_type_p
> ? ? qualified union in the first function is remapped during the versioning
> ? ? done by ipa-split to create the second function, and remapping overwrites
> ? ? the type of a FIELD_DECL of the original type.
> Proposed patch attached, bootstrapped/regtested on x86_64-suse-linux and LTO
> bootstrapped on the same platform. ?#1 is a regression from 4.6 and #2 has
> been exposed by ipa-split (although it's probably older) so I'd like to put
> this on the 4.7 branch as well.
Ok. Please make sure to verify LTO bootstrap on the branch still
works after this.
> 2012-05-25 ?Eric Botcazou ?<email@example.com>
> ? ? ? ?PR lto/52178
> ? ? ? ?* tree-inline.c (remap_gimple_op_r): Fix handling of FIELD_DECL.
> ? ? ? ?* tree.c (RETURN_TRUE_IF_VAR): Do not return true for PLACEHOLDER_EXPR.
> Eric Botcazou