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: unassignedclangb...@nondot.org
          Reporter: eugeni.stepa...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to