[LLVMbugs] [Bug 17531] New: clang fails explicit instantiate explicitly specialized classes with visibility-hidden

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 9 17:43:42 PDT 2013


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

            Bug ID: 17531
           Summary: clang fails explicit instantiate explicitly
                    specialized classes with visibility-hidden
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: artur at ebasoft.com.pl
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11355
  --> http://llvm.org/bugs/attachment.cgi?id=11355&action=edit
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>;

-- 
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/20131010/2b95d490/attachment.html>


More information about the llvm-bugs mailing list