This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix ICE on unaligned record field
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Dec 2014 11:50:21 +0100
- Subject: Re: [patch] Fix ICE on unaligned record field
- Authentication-results: sourceware.org; auth=none
- References: <3887233 dot jQSJCmu5YU at polaris> <1522896 dot 5Ls1L3QkSH at polaris> <CAFiYyc2wdLiP9OAO55Efi-+SBv+=1xLwv+WPVb7fg2YN1NvU1g at mail dot gmail dot com>
> Well, I call it a convenience that MEM_EXPR, unlike INDIRECT_REF, can
> be used to encapsulate an arbitrary byte-offset and view-conversion. Of
> course it's still a dereference of an address so that convenience doesn't
> work on sth non-addressable.
No discussion on the merits of MEM_EXPR vs INDIRECT_REF but on the pertinence
of creating ADDR_EXPRs out of nowhere just to use them.
> I'll leave that to you two to decide - Martins patch is ok if you are fine
> with disabling the optimization (also removing an unused parameter).
I'm fine with disabling it: the aggregate is passed directly so it's probably
small and, in the case at hand, the optimized caller would do 2 extractions
instead of only 1 so the gain is not obvious.
--
Eric Botcazou