This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix wrong code with VCE to bit-field type at -O
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 12 Feb 2014 11:54:27 +0100
- Subject: Re: [patch] Fix wrong code with VCE to bit-field type at -O
- Authentication-results: sourceware.org; auth=none
- References: <1407954 dot 7L4M0YkQRE at polaris> <CAFiYyc2LoKr+iT68vxVP4AqbFVdMt6YQBo_JHydauHtQcHhmhg at mail dot gmail dot com> <2414570 dot 56DTzrzgfj at polaris>
On Tue, Feb 11, 2014 at 6:15 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> Hmm. The intent was of course to only allow truly no-op converts via
>> VIEW_CONVERT_EXPR - that is, the size of the operand type and the
>> result type should be the same. So, isn't SRA doing it wrong when
>> creating the VIEW_CONVERT_EXPR of a 3-byte type to a 4-byte type?
>
> That's debatable IMO if the 4-byte type has 3-byte precision, but I don't have
> a strong opinion so I can try to fix it in SRA, although it will be weird to
> do low-level fiddling because of precision and size at the Tree level.
That's true. What I wonder is why the stmt checker doesn't trip. Probably
because while SRA scalarizes the thing the result isn't rewritten into
SSA form? So there may be a testcase where that happens and we'd even
ICE?
Richard.
> --
> Eric Botcazou