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

            Bug ID: 21331
           Summary: weird constant evaluation for addition of a constant
                    to a pointer cast from int
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

On a 32-bit system:

  char *p = (char*)123 + 0x1234500000000LL;

... compiles to:

@p = global i8* inttoptr (i64 320254236426363 to i8*), align 4

... which looks like we have the wrong APValue representation internally. I'm
not sure if this can manifest as incorrect behaviour but it looks suspicious.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to