[LLVMbugs] [Bug 10020] New: fail to codegen virtual function in template
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 25 20:48:56 PDT 2011
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: unassignedclangbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list