[LLVMbugs] [Bug 3043] New: lli fails pointer comparison test

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Nov 11 08:39:53 PST 2008


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

           Summary: lli fails pointer comparison test
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Target-Independent JIT
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: evan.cheng at apple.com
                CC: llvmbugs at cs.uiuc.edu


>From Prakash Prabhu:


#include<stdio.h>
#include<stdlib.h>

void test();
void (*funcPtr)();

int main(int argc, char **argv) {
  funcPtr = test;
  test();
}

void test() {
  if(funcPtr == test) {
    printf("OK!\n");
  } else {
    fprintf(stderr, "Bad!\n");
    exit(1);
  }
}

$ llvm-gcc -emit-llvm -o FPtrEqTest.bc -c FPtrEqTest.c
$ llc -f FPtrEqTest.bc
$ gcc -o FPtrEqTest FPtrEqTest.s
$ ./FPtrEqTest
OK!

$ lli FPtrEqTest.bc
Bad!


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