Backported from mainline
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.
* g++.dg/cpp0x/pr92524.C: New test.
From-SVN: r279659
2019-12-20 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 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 Jakub Jelinek <jakub@redhat.com>
PR c++/92648
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-12-20 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2019-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/92524
+ * g++.dg/cpp0x/pr92524.C: New test.
+
2019-11-26 Jakub Jelinek <jakub@redhat.com>
PR c++/92648
--- /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};
+}