re PR ipa/81007 (ICE with virtual function in broken class)
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. * g++.dg/pr81007.C: New testcase. From-SVN: r249051
This commit is contained in:
parent
903c723b9d
commit
6ba856d450
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
@ -267,7 +267,8 @@ ipa_polymorphic_call_context::restrict_to_inner_class (tree otr_type,
|
||||
{
|
||||
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);
|
||||
|
@ -42,9 +42,9 @@ along with GCC; see the file COPYING3. If not see
|
||||
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. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
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"
|
||||
|
15
gcc/testsuite/g++.dg/pr81007.C
Normal file
15
gcc/testsuite/g++.dg/pr81007.C
Normal file
@ -0,0 +1,15 @@
|
||||
// { 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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user