+2017-06-09 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/81007
+ * ipa-polymorphic-call.c
+ (ipa_polymorphic_call_context::restrict_to_inner_class):
+ Skip FIELD_DECLs with error_mark_node type.
+ * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
+ last again.
+
2017-06-09 Martin Liska <mliska@suse.cz>
* predict.c (struct branch_predictor): New struct.
{
for (fld = TYPE_FIELDS (type); fld; fld = DECL_CHAIN (fld))
{
- if (TREE_CODE (fld) != FIELD_DECL)
+ if (TREE_CODE (fld) != FIELD_DECL
+ || TREE_TYPE (fld) == error_mark_node)
continue;
pos = int_bit_position (fld);
NEXT_PASS (pass_build_cfg);
NEXT_PASS (pass_warn_function_return);
NEXT_PASS (pass_expand_omp);
- NEXT_PASS (pass_build_cgraph_edges);
NEXT_PASS (pass_sprintf_length, false);
NEXT_PASS (pass_walloca, /*strict_mode_p=*/true);
+ NEXT_PASS (pass_build_cgraph_edges);
TERMINATE_PASS_LIST (all_lowering_passes)
/* Interprocedural optimization passes. */
+2017-06-09 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/81007
+ * g++.dg/pr81007.C: New testcase.
+
2017-06-09 Jakub Jelinek <jakub@redhat.com>
* gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp"
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct A
+{
+ A p; // { dg-error "incomplete" }
+ virtual void foo();
+};
+
+struct B : A {};
+
+void bar(B& b)
+{
+ b.foo();
+}