Re: Bug#800318: gcc-5: [mips,mipsel] regression: miscompilation caused by -fexpensive-optimizations
On 2015-09-29 19:41, Andreas Cadhalpun wrote:
> On 28.09.2015 21:52, Aurelien Jarno wrote:
> > On 2015-09-28 18:17, Andreas Cadhalpun wrote:
> >> Attached is a testcase for mips, but it works fine for mipsel.
> >> One more peculiarity I noticed is that adding 'c->A = 1;' to
> >> an unused code path inverts the behavior: It works with
> >> -fexpensive-optimizations, but fails with -fno-expensive-optimizations.
> > Big thanks for working on that. I have done some tests with it and
> > -mtune=mips32r2 is the culprit not -march=mips32r2. This is kind of
> > unexpected, but at least it is consistent with the mipsel issue. This
> > means the optimization happens when scheduling the instructions. This
> > also means we have an easy workaround without lowering the ISA. I'll
> > commit that so that's in the next gcc upload.
> Great. Can you estimate when that upload will happen?
> (I'm trying to decide whether or not to workaround it in the meantime.)
This is handled by Matthias Klose, so it's a bit difficult to say, but I
guess before the end of the week. Note that version 5.2.1-18 might
appear as it has been uploaded today, but it was stuck in NEW for a few
> > I'll also try to better understand the issue so that I can report the
> > bug upstream.
On this aspect, I believe the problem might be PR66424 , at least the
fix for this bug fixes the testcase you provided. I am currently cleanly
building gcc with it and tomorrow morning I'll build ffmpeg with this
gcc to fully confirm. In the meantime Matthias asked upstream to
backport it to the stable gcc 5 branch, which has already been done a
few hours ago.
Aurelien Jarno GPG: 4096R/1DDD8C9B