[LLVMbugs] [Bug 661] NEW: llvm 1.6 CVS x86 miscompilation

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Nov 14 02:29:55 PST 2005


           Summary: llvm 1.6 CVS x86 miscompilation
           Product: libraries
           Version: 1.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: markus at oberhumer.com

llvm (CVS 1.6 branch) currently seems to miscompile this program when using
"llvm-g++ -Wl,-native". When running you get a segfault. Using "-Wl,-native-cbe"
seems to work, though.

#include <assert.h>

int v = 0;

struct Foo {
    int *p;
    Foo(int *pp) : p(pp) { *p += 1; }
    ~Foo() { *p -= 1; }

static Foo init_v(&v);

int main() {
    assert(v == 1);
    return 0;

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