aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-06-20 00:48:44 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-06-20 00:48:44 +0000
commit170b020fe4be4eadea27d389257778d952fb5a13 (patch)
tree18750127388f053e1dd83e7ae5f29fc9e9fe0bfb /gcc/cp/rtti.c
parent7a1d37e9102a1bbc34b4544161ddf283c667bc0b (diff)
downloadgcc-170b020fe4be4eadea27d389257778d952fb5a13.zip
gcc-170b020fe4be4eadea27d389257778d952fb5a13.tar.gz
gcc-170b020fe4be4eadea27d389257778d952fb5a13.tar.bz2
re PR middle-end/11041 (ICE: const myclass &x = *x; (when operator*() defined))
PR c++/11041 * call.c (initialize_reference): Do not use cp_finish_decl to emit temporary variables. * cp-tree.h (static_aggregates): Declare. (pushdecl_top_level_and_finish): Likewise. * decl.c (pushdecl_top_level_1): New function. (pushdecl_top_level): Use it. (pushdecl_top_level_and_finish): New function. (initialize_local_var): Remove redundant code. (cp_finish_decl): Remove support for RESULT_DECLs. Don't check building_stmt_tree. * decl.h (static_aggregates): Remove. * decl2.c (get_guard): Use pushdecl_top_level_and_finish. * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish. (tinfo_base_init): Likewise. PR c++/11041 * g++.dg/init/ref7.C: New test. From-SVN: r68236
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index ac117fa..1a29c1c 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -364,9 +364,8 @@ get_tinfo_decl (tree type)
DECL_EXTERNAL (d) = 1;
SET_DECL_ASSEMBLER_NAME (d, name);
DECL_COMDAT (d) = 1;
- cp_finish_decl (d, NULL_TREE, NULL_TREE, 0);
- pushdecl_top_level (d);
+ pushdecl_top_level_and_finish (d, NULL_TREE);
if (CLASS_TYPE_P (type))
CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
@@ -770,8 +769,7 @@ tinfo_base_init (tree desc, tree target)
SET_DECL_ASSEMBLER_NAME (name_decl,
mangle_typeinfo_string_for_type (target));
DECL_INITIAL (name_decl) = name_string;
- cp_finish_decl (name_decl, name_string, NULL_TREE, 0);
- pushdecl_top_level (name_decl);
+ pushdecl_top_level_and_finish (name_decl, name_string);
}
vtable_ptr = TINFO_VTABLE_DECL (desc);