re PR c++/70035 (Calling a non-virtual member in base-class constructor call with...
authorJakub Jelinek <jakub@redhat.com>
Fri, 4 Mar 2016 22:10:49 +0000 (23:10 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 4 Mar 2016 22:10:49 +0000 (23:10 +0100)
commit0c8825de94f416f4e76720f769f26e21c80d328c
tree8a513c754cfa209a3137cc23ee5567d3dfd1c8f6
parent188e53bd7e191526f2c6804601c031f8f7c53e14
re PR c++/70035 (Calling a non-virtual member in base-class constructor call with ubsan causes segfault when superclass has virtual member with same name)

PR c++/70035
* cp-tree.h (cp_ubsan_maybe_initialize_vtbl_ptrs): New prototype.
* decl.c (start_preparsed_function): Call
cp_ubsan_maybe_initialize_vtbl_ptrs if needed.
* cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs,
cp_ubsan_maybe_initialize_vtbl_ptrs): New functions.

* g++.dg/ubsan/pr70035.C: New test.

From-SVN: r233984
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/cp-ubsan.c
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr70035.C [new file with mode: 0644]