http://llvm.org/bugs/show_bug.cgi?id=10020
Summary: fail to codegen virtual function in template
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=6648)
--> (http://llvm.org/bugs/attachment.cgi?id=6648)
testcase
The attached stand-alone program does passes Sema just fine, emits a .o but
fails to link when built with clang. It does link when built with gcc.
The problem is that we have a vtable with an undefined reference to 'GMG<DAR
const>::Accept(MV*) const'.
$ g++ x.cc -o x
$ clang++ x.cc -o x
/usr/bin/ld: /tmp/cc-rJc7RO.o: in function vtable for GMG<DAR
const>:x.cc(.rodata._ZTV3GMGIK3DARE+0x20): error: undefined reference to
'GMG<DAR const>::Accept(int) const'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--
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