[LLVMbugs] [Bug 2413] New: void* address cast error

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jun 4 06:57:52 PDT 2008


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

           Summary: void* address cast error
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: csaba.hruska at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1707)
 --> (http://llvm.org/bugs/attachment.cgi?id=1707)
buggy example file

buggy code:

void f()
{
        void *addr;
        addr = (void *)( ((long int)addr + 7L) );
}

error:
ccc -c smemory.c
smemory.c
clang -emit-llvm-bc -x c -o smemory.o smemory.c
clang: /media/disk/download/llvm/svn/llvm/include/llvm/ADT/APSInt.h:159:
llvm::APSInt& llvm::APSInt::operator+=(const llvm::APSInt&): Assertion
`IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"' failed.
clang[0x837e778]
/lib/tls/i686/cmov/libc.so.6(abort+0x101)[0xb7d38a01]
/lib/tls/i686/cmov/libc.so.6(__assert_fail+0xee)[0xb7d3010e]
clang(_ZNK5clang4Expr21isIntegerConstantExprERN4llvm6APSIntERNS_10ASTContextEPNS_14SourceLocationEb+0x18d3)[0x822bfa3]

with gcc it compiles fine.

system: 32 bit ubuntu (hardy) linux x86
clang svn: At revision 51936.


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