This is the mail archive of the
mailing list for the GCC project.
Re: Is this FE bug or am I missing something?
- From: Igor Shevlyakov <igor dot shevlyakov at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 12 Sep 2016 12:41:45 -0700
- Subject: Re: Is this FE bug or am I missing something?
- Authentication-results: sourceware.org; auth=none
- References: <CAB=oy5_sCPZW4v8LwFN604oQ4hPv=CO3oEpOxwTVrFGFb=DYemail@example.com> <alpine.DEB.firstname.lastname@example.org>
Well, my concern is not what happens with overflow (which in second
case -fsanitize=undefined will address), but rather consistency of
that 2 cases.
p[x+1] generates RTL which leads to better generated code at the
expense of leading to overflow, while p[1+x] never overflows but leads
to worse code.
It would be beneficial to make the behaviour consistent between those 2 cases.
Thanks for your input
On Mon, Sep 12, 2016 at 12:51 AM, Marc Glisse <email@example.com> wrote:
> On Sun, 11 Sep 2016, Igor Shevlyakov wrote:
>> Small sample below fails (at least on 6.1) for multiple targets. The
>> difference between two functions start at the very first tree pass...
> You are missing -fsanitize=undefined (and #include <stdlib.h>).
> Please use the mailing list firstname.lastname@example.org next time.
> Marc Glisse