This probably won't be enough information to reproduce the bug, but I'm
recording it now in case someone else runs into the same problem.

Benchmark calculix from SPEC CPU2006 started failing with wrong results on
powerpc64-linux with either -m32 or -m64 and "-O2 -ffast-math" with this patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=137631

    r137631 | dberlin | 2008-07-08 16:11:06 +0000 (Tue, 08 Jul 2008)

It doesn't fail for i686-linux or x86_64-linux.

With recent mainline and as of r140162 (although not at r137631) it also fails
with "-O1 -ftree-pre -funsafe-math-optimizations".

The only file affected by the problem is rubber.f, which is generating wrong
results somewhere in lines 298-319.  Moving that code to another function makes
it work fine, of course, as does adding print statements in that code for
al(1).  This isn't a case of some values being a little off, they're massively
different, based on adding print statements later in the code.

I'll keep trying reproduce the problem with a smaller testcase.


-- 
           Summary: calculix gets wrong answer for -O1 -ftree-pre -ffast-
                    math
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37449

Reply via email to