[llvm-bugs] [Bug 27413] New: template destructor instantiated but not emitted to ir

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 18 14:35:01 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27413

            Bug ID: 27413
           Summary: template destructor instantiated but not emitted to ir
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

$ cat 1.cc
struct AA {};
template <typename> struct BB : public AA { ~BB(){}; };
template <typename> struct CC {
  CC(const BB<int> &v = {}) {}
};

int main() { CC<char> p; }

$ clang++ 1.cc -O0  -std=c++11
/tmp/1-8fca23.o: In function `main':
1.cc:(.text+0x1f): undefined reference to `BB<int>::~BB()'
1.cc:(.text+0x39): undefined reference to `BB<int>::~BB()'
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)

-- 
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/20160418/4af3ba46/attachment.html>


More information about the llvm-bugs mailing list