From ec5a0fe0422d6f472d75528a14bd22511914e240 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 20 Nov 2015 10:03:45 +0100 Subject: re PR c++/67354 (internal compiler error: in add_to_same_comdat_group, at symtab.c:421) PR c++/67354 * cp-tree.h (defer_mangling_aliases): Declare. (generate_mangling_aliases): New prototype. * decl2.c (defer_mangling_aliases): New variable. (note_mangling_alias): Use !defer_mangling_aliases instead of at_eof. (generate_mangling_aliases): No longer static. Clear defer_mangling_aliases. * optimize.c (maybe_thunk_body): Defer emitting mangling aliases if !defer_mangling_aliases until the fns are put into the same comdat group. * g++.dg/abi/mangle67.C: New test. From-SVN: r230646 --- gcc/cp/cp-tree.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/cp/cp-tree.h') diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 38bd7dd..1672291 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -4846,6 +4846,11 @@ extern GTY(()) vec *local_classes; extern int at_eof; +/* True if note_mangling_alias should enqueue mangling aliases for + later generation, rather than emitting them right away. */ + +extern bool defer_mangling_aliases; + /* A list of namespace-scope objects which have constructors or destructors which reside in the global scope. The decl is stored in the TREE_VALUE slot and the initializer is stored in the @@ -5772,6 +5777,7 @@ extern tree cxx_maybe_build_cleanup (tree, tsubst_flags_t); /* in decl2.c */ extern void note_mangling_alias (tree, tree); +extern void generate_mangling_aliases (void); extern bool check_java_method (tree); extern tree build_memfn_type (tree, tree, cp_cv_quals, cp_ref_qualifier); extern tree build_pointer_ptrmemfn_type (tree); -- cgit v1.1