[LLVMbugs] [Bug 4316] New: Assertion failed: "Ptr must be a pointer to Val type!"

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jun 3 10:37:22 PDT 2009


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

           Summary: Assertion failed: "Ptr must be a pointer to Val type!"
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core LLVM classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ed at 80386.nl
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 3696


I'm seeing the following crash with LLVM+Clang r72770:

cc -O2 -pipe   llvm-crash.c  -o llvm-crash
Assertion failed: (getOperand(0)->getType() ==
cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a
pointer to Val type!"), function AssertOK, file
.../llvm/lib/VMCore/Instructions.cpp, line 920.
Stack dump:
0.      Program arguments: /usr/bin/../libexec/clang-cc -triple
x86_64-undermydesk-freebsd8.0 -S -disable-free -main-file-name llvm-crash.c
--relocation-model static --disable-fp-elim --unwind-tables=1 --mcpu=x86-64
--fmath-errno=1 -O2 -fdiagnostics-show-option -o /tmp/cc-YwucJT.s -x c
llvm-crash.c 
1.      <eof> parser at end of file
2.      llvm-crash.c:7:1: LLVM IR generation of declaration 'crash'
3.      llvm-crash.c:8:1: LLVM IR generation of compound statement ('{}')

Code:

union un {
        int i;
        char *c;
};

void
crash(char *buffer)
{

        boom((union un)buffer);
}

I can't seem to generate any LLVM IR.


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