Backported from mainline
2016-06-14 Jakub Jelinek <jakub@redhat.com>
PR c++/71516
* decl.c (complete_vars): Handle gracefully type == error_mark_node.
* g++.dg/init/pr71516.C: New test.
From-SVN: r238097
+2016-07-07 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2016-06-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/71516
+ * decl.c (complete_vars): Handle gracefully type == error_mark_node.
+
2016-06-08 Jakub Jelinek <jakub@redhat.com>
PR c++/71442
tree var = iv->decl;
tree type = TREE_TYPE (var);
- if (TYPE_MAIN_VARIANT (strip_array_types (type))
- == iv->incomplete_type)
+ if (type != error_mark_node
+ && (TYPE_MAIN_VARIANT (strip_array_types (type))
+ == iv->incomplete_type))
{
/* Complete the type of the variable. The VAR_DECL itself
will be laid out in expand_expr. */
2016-07-07 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2016-06-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/71516
+ * g++.dg/init/pr71516.C: New test.
+
2016-06-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/71494
--- /dev/null
+// PR c++/71516
+// { dg-do compile }
+
+struct A; // { dg-message "forward declaration of" }
+struct B
+{
+ static A a;
+};
+A B::a = A(); // { dg-error "has initializer but incomplete type|invalid use of incomplete type" }
+struct A {};