<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang fails explicit instantiate explicitly specialized classes with visibility-hidden"
href="http://llvm.org/bugs/show_bug.cgi?id=17531">17531</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang fails explicit instantiate explicitly specialized classes with visibility-hidden
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>artur@ebasoft.com.pl
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11355" name="attach_11355" title="full code with CMakeConfig reproducing bug.">attachment 11355</a> <a href="attachment.cgi?id=11355&action=edit" title="full code with CMakeConfig reproducing bug.">[details]</a></span>
full code with CMakeConfig reproducing bug.
clang 3.3 and trunc fails instantiate
Case:
explicitly instantiate class which is explicitly specialized and unspecialized
declaration has missing visibility(default) then other specialized variants
will not be instantiated at all
Simplified code , please analyze attached bz2 archive wich reproducess bug.
Notice : /*VISIBILITY_DEFAULT*/
Effect: foo_plugin_base_t<THIS_TYPE,double> will not be instantiated
Effect: There are no warrnings, just missing symbols in .so
CC=clang CXX=clang++ cmake ../ -DCMAKE_CXX_FLAGS="-std=c++11
-fvisibility=hidden -fvisibility-inlines-hidden"
#define VISIBILITY_DEFAULT __attribute__ ((visibility ("default")))
template<typename THIS_TYPE, typename value_type>
struct /*VISIBILITY_DEFAULT*/ foo_plugin_base_t
{
};
template<typename THIS_TYPE>
struct VISIBILITY_DEFAULT foo_plugin_base_t<THIS_TYPE,double>
{
void may_custom_method();
};
template struct foo_plugin_base_t<foo_t<double>,double>;
template struct foo_plugin_t<foo_t<double>,double>;</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>