[LLVMbugs] [Bug 3321] New: incorrect optimisation of linked list code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jan 13 04:55:23 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=3321

           Summary: incorrect optimisation of linked list code
           Product: libraries
           Version: 2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: jay.foad at antixlabs.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2385)
 --> (http://llvm.org/bugs/attachment.cgi?id=2385)
source file

The attached program should return 42. But if I build it with llvm-gcc on
Linux/x86, I get non-deterministic results:

$ ~/llvm/llvm-gcc4.2-2.4-x86-linux-RHEL4/bin/llvm-gcc -O2 -o f f.c
$ ./f ; echo $?
212
$ ./f ; echo $?
164
$ ./f ; echo $?
212
$ ./f ; echo $?
180

It looks like the optimizers have replaced all my code with "ret i32 undef".


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list