Commit 7457279b by Jason Merrill Committed by Jason Merrill

re PR c++/66654 (ice in digest_init_r, at cp/typeck2.c:1103)

	PR c++/66654
	* typeck2.c (digest_init_r): Only expect reshaping if the class is
	aggregate.

From-SVN: r225082
parent a2b5fdcb
2015-06-26 Jason Merrill <jason@redhat.com>
PR c++/66654
* typeck2.c (digest_init_r): Only expect reshaping if the class is
aggregate.
2015-06-26 Marek Polacek <polacek@redhat.com>
* cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
......
......@@ -1095,7 +1095,8 @@ digest_init_r (tree type, tree init, bool nested, int flags,
if (cxx_dialect >= cxx11
&& BRACE_ENCLOSED_INITIALIZER_P (init)
&& CONSTRUCTOR_NELTS (init) == 1
&& (CLASS_TYPE_P (type) || VECTOR_TYPE_P (type)))
&& ((CLASS_TYPE_P (type) && !CLASSTYPE_NON_AGGREGATE (type))
|| VECTOR_TYPE_P (type)))
{
tree elt = CONSTRUCTOR_ELT (init, 0)->value;
if (reference_related_p (type, TREE_TYPE (elt)))
......
// PR c++/66654
// { dg-do compile { target c++11 } }
class A {
A();
};
class B {
A r{r};
};
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