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: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 3 May 2017 18:46:05 +0200
- Subject: Re: Fix bootstrap issue with gcc 4.1
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 997E461D12
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 997E461D12
- References: <20170503161807.GK95638@kam.mff.cuni.cz> <20170503162214.GN1809@tucnak> <2B82253A-ED27-4B36-8176-3C83EFDE6639@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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.).
Jakub