diff options
author | Jan Hubicka <jh@suse.cz> | 2007-04-22 17:33:32 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2007-04-22 15:33:32 +0000 |
commit | 395a40e0e28129430ca707dad8475fefad3d8782 (patch) | |
tree | 7a5b02a557aae27620a13c42bc29913de6d67d9e /gcc/final.c | |
parent | b7716a8e90c72b98b9f92f20c1fa142e6573e05d (diff) | |
download | gcc-395a40e0e28129430ca707dad8475fefad3d8782.zip gcc-395a40e0e28129430ca707dad8475fefad3d8782.tar.gz gcc-395a40e0e28129430ca707dad8475fefad3d8782.tar.bz2 |
misc.c (gnat_expand_body): Don't call target for destructors, avoid redundant check on syntax errors.
* ada/misc.c (gnat_expand_body): Don't call target for destructors,
avoid redundant check on syntax errors.
* final.c (rest_of_handle_final): Call
targetm.asm_out.constructor/targetm.asm_out.destructor
* cgraphunit.c (cgraph_build_static_cdtor): Don't do it here; set
proper priority via decl_*_priority_insert.
* c-common.c (c_expand_body): Likewise.
From-SVN: r124044
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c index a18f029..ebc1efe 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -4043,6 +4043,16 @@ rest_of_handle_final (void) timevar_push (TV_SYMOUT); (*debug_hooks->function_decl) (current_function_decl); timevar_pop (TV_SYMOUT); + if (DECL_STATIC_CONSTRUCTOR (current_function_decl) + && targetm.have_ctors_dtors) + targetm.asm_out.constructor (XEXP (DECL_RTL (current_function_decl), 0), + decl_init_priority_lookup + (current_function_decl)); + if (DECL_STATIC_DESTRUCTOR (current_function_decl) + && targetm.have_ctors_dtors) + targetm.asm_out.destructor (XEXP (DECL_RTL (current_function_decl), 0), + decl_fini_priority_lookup + (current_function_decl)); return 0; } |