This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix bootstrap issue with gcc 4.1
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>,gcc-patches at gcc dot gnu dot org
- Date: Wed, 03 May 2017 18:54:48 +0200
- Subject: Re: Fix bootstrap issue with gcc 4.1
- Authentication-results: sourceware.org; auth=none
- References: <20170503161807.GK95638@kam.mff.cuni.cz> <20170503162214.GN1809@tucnak> <2B82253A-ED27-4B36-8176-3C83EFDE6639@gmail.com> <20170503164605.GP1809@tucnak>
On May 3, 2017 6:46:05 PM GMT+02:00, Jakub Jelinek <jakub@redhat.com> wrote:
>On Wed, May 03, 2017 at 06:44:46PM +0200, Richard Biener wrote:
>> On May 3, 2017 6:22:14 PM GMT+02:00, Jakub Jelinek <jakub@redhat.com>
>wrote:
>> >On Wed, May 03, 2017 at 06:18:08PM +0200, Jan Hubicka wrote:
>> >> Hi,
>> >> my change to sreals makes GCC to be miscompiled with GCC 4.1 and
>-O0.
>> > This is
>> >> related to fact that using sreal implies a non-trivial constructor
>> >and thus
>> >> ggc_cleared_alloc is no longer standard compliant. I however do
>not
>> >quite understand
>> >> why GCC 4.1 manages to misoptimize this code but I have checked
>that
>> >this helps
>> >> to fix the issue and hopefully will re-start our periodic testers.
>> >
>> >Is store-merging pass able to optimize that back into reasonable
>code
>> >(sure, not into ggc_cleared_alloc)?
>>
>> Whether it is or not, the previous code was buggy. The zeroing does
>not
>> prevail until after the object construction begins (not sure whether
>for
>> PODs this would be different).
>
>Sure, I'm not questioning the patch, just wondering if we shouldn't
>improve
>store-merging further (we want to do it anyway for e.g. bitop adjacent
>operations etc.).
We definitely want to do that. It should also 'nicely' merge with bswap for gathering the load side of a piecewise memory to memory copy.
Richard.
>
> Jakub