[LLVMbugs] [Bug 11426] New: Assertion `V->getType()->isPointerTy() && "Capture is for pointers only!"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 23 09:29:35 PST 2011


             Bug #: 11426
           Summary: Assertion `V->getType()->isPointerTy() && "Capture is
                    for pointers only!"' failed.
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ opt -dse non-ptr-malloc.ll -disable-output
opt: llvm/lib/Analysis/CaptureTracking.cpp:76: void
llvm::PointerMayBeCaptured(const llvm::Value*, llvm::CaptureTracker*):
Assertion `V->getType()->isPointerTy() && "Capture is for pointers only!"'

Here is the testcase.  Probably someone is assuming that a function called
"malloc" has to return a pointer.

target datalayout =
target triple = "x86_64-unknown-linux-gnu"

define i64 @unc_memops__alloc(i64 %size) uwtable {
  %0 = tail call i64 @malloc(i64 %size)

declare i64 @malloc(i64)

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