This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR61456
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 Jun 2014 11:22:56 +0200
- Subject: Re: [PATCH] Fix PR61456
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1406101152000 dot 2632 at zhemvz dot fhfr dot qr>
> The following fixes an issue with nonoverlapping_component_refs_of_decl_p
> (and the latent same issue in nonoverlapping_component_refs_p). We
> can't rely on all variant types having the same TYPE_FIELDS, so the
> following simply uses DECL_FIELD_CONTEXT directly (which is either
> the same for shared TYPE_FIELDS or not - in which case we can't
> use TYPE_MAIN_VARIANT anyway).
Thanks for fixing this. IIRC I wondered for a few moments about this
apparently superfluous usage of TYPE_MAIN_VARIANT in the original version of
nonoverlapping_component_refs_p, but I didn't realize that it could in fact
lead to wrong code...