Commit f344f525 by Paolo Carlini Committed by Paolo Carlini

re PR c++/58871 ([c++11] ICE with defaulted copy constructor in broken template class hierarchy)

/cp
2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58871
	* method.c (synthesized_method_walk): If vbases is non-null but
	is_empty is true, likewise don't worry about the virtual bases.

/testsuite
2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58871
	* g++.dg/cpp0x/pr58871.C: New.

From-SVN: r207434
parent cf5b2be2
2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58871
* method.c (synthesized_method_walk): If vbases is non-null but
is_empty is true, likewise don't worry about the virtual bases.
2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51219
......
......@@ -1366,7 +1366,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p,
}
vbases = CLASSTYPE_VBASECLASSES (ctype);
if (vbases == NULL)
if (vec_safe_is_empty (vbases))
/* No virtual bases to worry about. */;
else if (!assign_p)
{
......
2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58871
* g++.dg/cpp0x/pr58871.C: New.
2014-02-03 Cong Hou <congh@google.com>
PR tree-optimization/60000
......
// PR c++/59111
// { dg-do compile { target c++11 } }
template<typename T> struct A : virtual T // { dg-error "base type" }
{
A();
A(const A&);
};
template<typename T> A<T>::A(const A<T>&) = default;
A<int> a = A<int>();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment