[llvm-bugs] [Bug 39988] New: aggregate initialization in new expression fails

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 13 00:53:07 PST 2018


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

            Bug ID: 39988
           Summary: aggregate initialization in new expression fails
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: szymon.romik at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

template<typename T>
struct A {
         A() {};
        ~A() {};
};

struct B {
        A<int> a;
        A<int> b;
};


int main() {
    new B{};
    return 0;
}

Error message is confusing:
In function `main':
prog.cc:(.text+0x76): undefined reference to `A<int>::~A()'
clang-7: error: linker command failed with exit code 1 (use -v to see
invocation)

However, it works with clang trunk.

It might be canonical version of problem introduced here:
https://bugs.llvm.org/show_bug.cgi?id=35835

-- 
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/20181213/7b499f98/attachment.html>


More information about the llvm-bugs mailing list