[LLVMbugs] [Bug 6414] New: Nondeterministic invalid optimization in llvm-ld

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 24 08:06:57 PST 2010


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

           Summary: Nondeterministic invalid optimization in llvm-ld
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: llvm-ld
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: stein at ir.iit.edu
                CC: llvmbugs at cs.uiuc.edu


in.bc gets invalidly optimized when run through
llvm-ld -native -o=a in.bc
It nondeterministically becomes either bad.bc or good.bc.
good.bc correctly prints "8".
bad.bc incorrectly prints "-2147483648".
Using -disable-opt makes it always work correctly.

This occurs in top-of-tree.

The input program for in.bc:
---------------
void print_int(int);

int(*)() f() {
  int g() {
    return 8;
  }

  return g;
}

void main() {
  print_int(f()());
}
---------------

BitCode files attached.

-- 
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