From 8595a07d8d161b4c612101171f3ad423689ec020 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 30 Aug 2013 11:39:20 +0200 Subject: [PATCH] Correct previous patch to not mark terminate as LEAF. * class.c (build_vtbl_initializer): Drop LEAF * decl.c (cxx_init_decl_processing): Likewise. (push_throw_library_fn): Likewise. * except.c (init_exception_processing): Likewise. (do_begin_catch): Likewise. (do_end_catch): Likewise. (do_allocate_exception): Likewise. From-SVN: r202100 --- gcc/cp/ChangeLog | 11 +++++++++++ gcc/cp/class.c | 2 +- gcc/cp/decl.c | 4 ++-- gcc/cp/except.c | 19 +++++++------------ 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2b2f45aab00..2af563e06dc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,14 @@ +2013-08-29 Jan Hubicka + + Correct previous patch to not mark terminate as LEAF. + * class.c (build_vtbl_initializer): Drop LEAF + * decl.c (cxx_init_decl_processing): Likewise. + (push_throw_library_fn): Likewise. + * except.c (init_exception_processing): Likewise. + (do_begin_catch): Likewise. + (do_end_catch): Likewise. + (do_allocate_exception): Likewise. + 2013-08-29 Jan Hubicka * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 3f77d22fcc9..bcd8076b09d 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -8873,7 +8873,7 @@ build_vtbl_initializer (tree binfo, if (!get_global_value_if_present (fn, &fn)) fn = push_library_fn (fn, (build_function_type_list (void_type_node, NULL_TREE)), - NULL_TREE, ECF_NORETURN | ECF_LEAF); + NULL_TREE, ECF_NORETURN); if (!TARGET_VTABLE_USES_DESCRIPTORS) init = fold_convert (vfunc_ptr_type_node, build_fold_addr_expr (fn)); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index bead6e84183..b4223aa5706 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3816,7 +3816,7 @@ cxx_init_decl_processing (void) abort_fndecl = build_library_fn_ptr ("__cxa_pure_virtual", void_ftype, - ECF_NORETURN | ECF_NOTHROW | ECF_LEAF); + ECF_NORETURN | ECF_NOTHROW); /* Perform other language dependent initializations. */ init_class_processing (); @@ -4104,7 +4104,7 @@ push_void_library_fn (tree name, tree parmtypes, int ecf_flags) tree push_throw_library_fn (tree name, tree type) { - tree fn = push_library_fn (name, type, NULL_TREE, ECF_NORETURN | ECF_LEAF); + tree fn = push_library_fn (name, type, NULL_TREE, ECF_NORETURN); return fn; } diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 164b35c3a73..fbebcbafdcb 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -58,8 +58,7 @@ init_exception_processing (void) push_namespace (std_identifier); tmp = build_function_type_list (void_type_node, NULL_TREE); terminate_node = build_cp_library_fn_ptr ("terminate", tmp, - ECF_NOTHROW | ECF_NORETURN - | ECF_LEAF); + ECF_NOTHROW | ECF_NORETURN); TREE_THIS_VOLATILE (terminate_node) = 1; TREE_NOTHROW (terminate_node) = 1; pop_namespace (); @@ -192,8 +191,7 @@ do_begin_catch (void) if (!get_global_value_if_present (fn, &fn)) { /* Declare void* __cxa_begin_catch (void *) throw(). */ - fn = declare_library_fn (fn, ptr_type_node, ptr_type_node, - ECF_NOTHROW | ECF_LEAF); + fn = declare_library_fn (fn, ptr_type_node, ptr_type_node, ECF_NOTHROW); /* Create its transactional-memory equivalent. */ if (flag_tm) @@ -201,8 +199,7 @@ do_begin_catch (void) tree fn2 = get_identifier ("_ITM_cxa_begin_catch"); if (!get_global_value_if_present (fn2, &fn2)) fn2 = declare_library_fn (fn2, ptr_type_node, - ptr_type_node, - ECF_NOTHROW | ECF_TM_PURE | ECF_LEAF); + ptr_type_node, ECF_NOTHROW | ECF_TM_PURE); record_tm_replacement (fn, fn2); } } @@ -242,15 +239,14 @@ do_end_catch (tree type) { /* Declare void __cxa_end_catch (). This can throw if the destructor for the exception throws. */ - fn = push_void_library_fn (fn, void_list_node, ECF_LEAF); + fn = push_void_library_fn (fn, void_list_node, 0); /* Create its transactional-memory equivalent. */ if (flag_tm) { tree fn2 = get_identifier ("_ITM_cxa_end_catch"); if (!get_global_value_if_present (fn2, &fn2)) - fn2 = push_void_library_fn (fn2, void_list_node, - ECF_TM_PURE | ECF_LEAF); + fn2 = push_void_library_fn (fn2, void_list_node, ECF_TM_PURE); record_tm_replacement (fn, fn2); } } @@ -630,7 +626,7 @@ do_allocate_exception (tree type) { /* Declare void *__cxa_allocate_exception(size_t) throw(). */ fn = declare_library_fn (fn, ptr_type_node, size_type_node, - ECF_NOTHROW | ECF_MALLOC | ECF_LEAF); + ECF_NOTHROW | ECF_MALLOC); if (flag_tm) { @@ -638,8 +634,7 @@ do_allocate_exception (tree type) if (!get_global_value_if_present (fn2, &fn2)) fn2 = declare_library_fn (fn2, ptr_type_node, size_type_node, - ECF_NOTHROW | ECF_MALLOC | ECF_TM_PURE - | ECF_LEAF); + ECF_NOTHROW | ECF_MALLOC | ECF_TM_PURE); record_tm_replacement (fn, fn2); } }