This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [REPOST] Invalid Code when reading from unaligned zero-sized array
- From: Jeff Law <law at redhat dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>, Eric Botcazou <ebotcazou at adacore dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 03 Dec 2013 12:16:39 -0700
- Subject: Re: [REPOST] Invalid Code when reading from unaligned zero-sized array
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W20B5CD3C7B50824A33E21AE4D50 at phx dot gbl>,<39610586 dot SlR956q6hK at polaris> <DUB122-W257F0112A9B7F20A5752E7E4D50 at phx dot gbl>
On 12/03/13 11:40, Bernd Edlinger wrote:
To me it does not feel like a hack at all, if the expansion needs to know in what
context the result will be used, if it is in an LHS or in a RHS or if the address of
the memory is needed.
Expansion needs some context and it's currently passed into expand_expr
via a variety of methods. Most are documented at the start of
expand_expr_real. It's unclean, but that doesn't mean we should make it
worse. Adding more context is something we should think long and hard
about.
Eric's comment that we have a non-BLKmode object with a variable size I
think is critical. I'm pretty sure that's not a well-defined object.
Given a variable sized object that is not BLKmode, how can we reliably
get its size (you can't, that's part of the reason why BLKmode exists)
I'd pull on that thread.
To make that perfectly clear, I just want to help.
Understood and its greatly appreciated.
And even if I commit something, it can be reverted anytime, when we have
something better.
We try to get it right the first time :-) Reverting bits is undesirable
and virtually impossible if it gets out into a release.
jeff