[llvm-bugs] [Bug 34327] New: VTable handling for virtual calls in constructor

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 25 14:19:44 PDT 2017


            Bug ID: 34327
           Summary: VTable handling for virtual calls in constructor
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: danielcdh at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

#cat a.cc
struct A {
  A() : A(V()) {}
  A(int p) {}
  virtual int V() {return 0;}

struct B: public A{
  B() : A() {}

int main() {
  B b;
  return 0;
#g++ a.cc --std=c++11; ./a.out; echo $?
#clang++ a.cc --std=c++11; ./a.out; echo $?
Segmentation fault (core dumped)
#clang++ --version
clang version 6.0.0 (trunk 311707)
Target: x86_64-unknown-linux-gnu
Thread model: posix

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/20170825/7fdd5f5e/attachment.html>

More information about the llvm-bugs mailing list