[LLVMbugs] [Bug 424] NEW: [llvmgcc] llvmgcc emits invalid constant exprs!

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Aug 17 10:10:40 PDT 2004


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

           Summary: [llvmgcc] llvmgcc emits invalid constant exprs!
           Product: tools
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org


In this example (cut down from povray):

-------------------
struct foo {
  int Y;
  char X[100];
} F;

int test(char *Y) {
   return Y - F.X;
} 
-------------------

llvmgcc is emitting the following invalid constantexpr:

%tmp.5 = add int %tmp.1, sub (int cast (%struct.foo* sub (%struct.foo* null,
                                                          %struct.foo* %F)
                                        to int),
                              int 4)

The problem is the pointer subtract operation, which is not a kosher constant
expr (subtract only works for integral and fp types).

-Chris



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