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

           Summary: Function pointer with template cannot be passed as
                    argument
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Created an attachment (id=4727)
 --> (http://llvm.org/bugs/attachment.cgi?id=4727)
reduction of problem

Clang r102190.

$ clang++ reduce.cc
clang: Instructions.cpp:247: void llvm::CallInst::init(llvm::Value*,
llvm::Value* const*, unsigned int): Assertion `(i >= FTy->getNumParams() ||
FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad
signature!"' failed.

Code below, also attached.  This came up in compiling WebKit with v8.


template <class T> class Foo;

// Callback type that involves template.
typedef void (*Callback)(Foo<int> arg);
// Function that is an instance of that type.
static void f(Foo<int> arg);
// Function that takes a callback as an argument.
void g(Callback callback);

// Pass one to the other -- boom.
void h() {
  g(&f);
}

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to