Commit f28fd43e by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/72808 (ICE on valid c++ code in verify_type (gcc/tree.c:14047))

	PR c++/72808
	* decl.c (finish_enum_value_list): Call fixup_type_variants on
	current_class_type after
	insert_late_enum_def_into_classtype_sorted_fields.

	* g++.dg/debug/pr72808.C: New test.

Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r242930
parent d0570047
2016-11-28 Jakub Jelinek <jakub@redhat.com>
Jason Merrill <jason@redhat.com>
PR c++/72808
* decl.c (finish_enum_value_list): Call fixup_type_variants on
current_class_type after
insert_late_enum_def_into_classtype_sorted_fields.
2016-11-28 Jakub Jelinek <jakub@redhat.com>
PR c++/77591
* typeck.c (maybe_warn_about_returning_address_of_local): Optimize
......
......@@ -14280,8 +14280,11 @@ finish_enum_value_list (tree enumtype)
if (at_class_scope_p ()
&& COMPLETE_TYPE_P (current_class_type)
&& UNSCOPED_ENUM_P (enumtype))
insert_late_enum_def_into_classtype_sorted_fields (enumtype,
current_class_type);
{
insert_late_enum_def_into_classtype_sorted_fields (enumtype,
current_class_type);
fixup_type_variants (current_class_type);
}
/* Finish debugging output for this type. */
rest_of_type_compilation (enumtype, namespace_bindings_p ());
......
2016-11-28 Jakub Jelinek <jakub@redhat.com>
PR c++/72808
* g++.dg/debug/pr72808.C: New test.
PR rtl-optimization/78546
* gcc.dg/torture/pr78546-1.c: New test.
* gcc.dg/torture/pr78546-2.c: New test.
......
// PR c++/72808
// { dg-do compile }
// { dg-options "-g -std=c++14" }
struct A
{
virtual void foo ();
};
struct B : A
{
void foo ();
enum C : int;
};
enum B::C : int
{
D
};
void
B::foo ()
{
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment