[LLVMbugs] [Bug 20521] New: Broken symbol visibility on explicit template instantiation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Aug 3 06:48:23 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20521
Bug ID: 20521
Summary: Broken symbol visibility on explicit template
instantiation
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: mail+llvm at tzik.jp
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 12850
--> http://llvm.org/bugs/attachment.cgi?id=12850&action=edit
failcase
Clang fails to build a binary in attached case with error message below:
>failcase_main.o:failcase_main.cc:function main: error: undefined reference to 'Failcase<Bar<int> >::~Failcase()'
>failcase_main.o:failcase_main.cc:function Failcase<Bar<int> >::Failcase(): error: undefined reference to 'vtable for Failcase<Bar<int> >'
GCC successfully build the binary, and it emits ~Failcase() to libfailcase.so
as a WEAK DEFAULT symbol, while clang emits it as a LOCAL HIDDEN symbol
according to readelf -sW.
In addition, attached repro case is very fragile.
If I replace an "unsigned int" with "int", reorder the function definition or
removing no-op function call in the failcase.h,
it no longer reproduces the failure, and clang emits WEAK DEFAULT symbol to
libfailcase.so for ~Failcase().
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140803/0a0cdaf1/attachment.html>
More information about the llvm-bugs
mailing list