* decl.c (register_dtor_fn): Mark cleanup as used.
* decl2.c (mark_vtable_entries): Skip nops.
* rtti.c (get_tinfo_ptr): Mark tinfo as used.
(build_dynamic_cast_1): Likewise.
(tinfo_base_init): Likewise.
(emit_tinfo_decl): Likewise.
From-SVN: r68377
+Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
+
+ * decl.c (register_dtor_fn): Mark cleanup as used.
+ * decl2.c (mark_vtable_entries): Skip nops.
+ * rtti.c (get_tinfo_ptr): Mark tinfo as used.
+ (build_dynamic_cast_1): Likewise.
+ (tinfo_base_init): Likewise.
+ (emit_tinfo_decl): Likewise.
+
2003-06-23 Jakub Jelinek <jakub@redhat.com>
* mangle.c (hash_type): val is the TREE_LIST itself, not a pointer
2003-06-23 Jakub Jelinek <jakub@redhat.com>
* mangle.c (hash_type): val is the TREE_LIST itself, not a pointer
/* Call atexit with the cleanup function. */
cxx_mark_addressable (cleanup);
/* Call atexit with the cleanup function. */
cxx_mark_addressable (cleanup);
cleanup = build_unary_op (ADDR_EXPR, cleanup, 0);
if (flag_use_cxa_atexit)
{
cleanup = build_unary_op (ADDR_EXPR, cleanup, 0);
if (flag_use_cxa_atexit)
{
{
tree fnaddr = TREE_VALUE (entries);
tree fn;
{
tree fnaddr = TREE_VALUE (entries);
tree fn;
+
+ STRIP_NOPS (fnaddr);
+
if (TREE_CODE (fnaddr) != ADDR_EXPR
&& TREE_CODE (fnaddr) != FDESC_EXPR)
/* This entry is an offset: a virtual base class offset, a
if (TREE_CODE (fnaddr) != ADDR_EXPR
&& TREE_CODE (fnaddr) != FDESC_EXPR)
/* This entry is an offset: a virtual base class offset, a
static tree
get_tinfo_ptr (tree type)
{
static tree
get_tinfo_ptr (tree type)
{
+ tree decl = get_tinfo_decl (type);
+
+ mark_used (decl);
return build_nop (type_info_ptr_type,
return build_nop (type_info_ptr_type,
- build_address (get_tinfo_decl (type)));
}
/* Return the type_info object for TYPE. */
}
/* Return the type_info object for TYPE. */
target_type = TYPE_MAIN_VARIANT (TREE_TYPE (type));
static_type = TYPE_MAIN_VARIANT (TREE_TYPE (exprtype));
target_type = TYPE_MAIN_VARIANT (TREE_TYPE (type));
static_type = TYPE_MAIN_VARIANT (TREE_TYPE (exprtype));
- td2 = build_unary_op (ADDR_EXPR, get_tinfo_decl (target_type), 0);
- td3 = build_unary_op (ADDR_EXPR, get_tinfo_decl (static_type), 0);
+ td2 = get_tinfo_decl (target_type);
+ mark_used (td2);
+ td2 = build_unary_op (ADDR_EXPR, td2, 0);
+ td3 = get_tinfo_decl (static_type);
+ mark_used (td3);
+ td3 = build_unary_op (ADDR_EXPR, td3, 0);
/* Determine how T and V are related. */
boff = get_dynamic_cast_base_type (static_type, target_type);
/* Determine how T and V are related. */
boff = get_dynamic_cast_base_type (static_type, target_type);
SET_DECL_ASSEMBLER_NAME (name_decl,
mangle_typeinfo_string_for_type (target));
DECL_INITIAL (name_decl) = name_string;
SET_DECL_ASSEMBLER_NAME (name_decl,
mangle_typeinfo_string_for_type (target));
DECL_INITIAL (name_decl) = name_string;
pushdecl_top_level_and_finish (name_decl, name_string);
}
pushdecl_top_level_and_finish (name_decl, name_string);
}
DECL_COMDAT (decl) = 0;
DECL_INITIAL (decl) = var_init;
DECL_COMDAT (decl) = 0;
DECL_INITIAL (decl) = var_init;
cp_finish_decl (decl, var_init, NULL_TREE, 0);
/* cp_finish_decl will have dealt with linkage. */
cp_finish_decl (decl, var_init, NULL_TREE, 0);
/* cp_finish_decl will have dealt with linkage. */