class.c (fixup_type_variants): Do not copy TYPE_METHODS
authorJan Hubicka <hubicka@ucw.cz>
Mon, 11 May 2015 22:24:33 +0000 (00:24 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 11 May 2015 22:24:33 +0000 (22:24 +0000)
commit5ce039dfe917d694bef1ecb16844f3b1bcb7ed09
treeb27aa77b5c6f68e088a61128b1c06c597c6b36f9
parent20d4397af8a085a17925d3a3a3545748d5ab7fc6
class.c (fixup_type_variants): Do not copy TYPE_METHODS

* class.c (fixup_type_variants): Do not copy TYPE_METHODS
(one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
* semantics.c (finish_member_declaration): Likewise.
* method.c (lazily_declare_fn): Allways add method to main variant list.

* dwarf2out.c (gen_member_die): Sanity check that we access TYPE_MAIN_VARIANT
for TYPE_METHODS.
* function.c (use_register_for_decl): Look for TYPE_MAIN_VARIANT when checking
TYPE_METHODS.
* tree.c (free_lang_data_in_type): See TYPE_METHODS to error_mark_node
if non-null.
(build_distinct_type_copy): Clear TYPE_METHODS.
(verify_type_variant): Verify that TYPE_METHODS is NULL for variants.
(verify_type): Allow TYPE_METHODS to be error_mark_node.
* tree.def: Update docs of YTPE_STUB_DECL and TYPE_METHODS.

From-SVN: r223021
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/method.c
gcc/cp/semantics.c
gcc/dwarf2out.c
gcc/function.c
gcc/tree.c
gcc/tree.def