PR c++/92524
* tree.c (replace_placeholders_r): Don't walk constructor elts with
RANGE_EXPR indexes.
* g++.dg/cpp0x/pr92524.C: New test.
From-SVN: r278759
+2019-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/92524
+ * tree.c (replace_placeholders_r): Don't walk constructor elts with
+ RANGE_EXPR indexes.
+
2019-11-26 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Remember the
tree type = TREE_TYPE (*valp);
tree subob = obj;
+ /* Elements with RANGE_EXPR index shouldn't have any
+ placeholders in them. */
+ if (ce->index && TREE_CODE (ce->index) == RANGE_EXPR)
+ continue;
+
if (TREE_CODE (*valp) == CONSTRUCTOR
&& AGGREGATE_TYPE_P (type))
{
+2019-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/92524
+ * g++.dg/cpp0x/pr92524.C: New test.
+
2019-11-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/92645
--- /dev/null
+// PR c++/92524
+// { dg-do compile { target c++11 } }
+
+struct A { char a = '*'; };
+struct B { A b[64]; };
+
+void
+foo ()
+{
+ A a;
+ B{a};
+}