[LLVMbugs] [Bug 586] NEW: Output of program differs between debug & optimized versions

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jun 16 16:57:01 PDT 2005


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=586

           Summary: Output of program differs between debug & optimized
                    versions
           Product: tools
           Version: 1.5
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bryan.turner at pobox.com


Hello,

This is smallest test case of a set of programs which produce different outputs
when compiled debug vs optimized.  I'm not sure how to go about reducing the
test case to find this type of bug.  I read the bugpoint how-to for
miscompilations and tried a few variations on the command, but it always exited
with the output:

*** Optimized program matches reference output!  No problem detected...
bugpoint can't help you with your problem!

--------------------

Basically, I compile the attached source code using two commands:

   llvm-gcc -w -o debug junk.cpp
   llvm-gcc -O3 -w -o opti junk.cpp

Then run them, redirecting output to a file:

   ./debug > debug.out
   ./opti > opti.out

Then diff the files:

   diff debug.out opti.out

   Any differences must be an error in the optimization of the program, or an
error in the semantics of the source code which is interpreted differently
during the optimization pass. (Since it is a randomly generated program, poor
semantics are guaranteed!)

   The program ran in Valgrind without any complaints in both debug and
optimized versions.

-------------------------

I'm leaving town for a week, so if you push-back on this bug for more input/test
reduction/etc.. I'll get to it around the 27th.

Also, it looks like the random program generator has been pretty usefull (found
a gcc bug too).  I'll work to clean it up for release when I get back.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list