diff options
author | Mark Mitchell <mark@codesourcery.com> | 2007-11-06 00:30:52 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2007-11-06 00:30:52 +0000 |
commit | 873c716480f5aedc692af4d4ddf15e72682c5f27 (patch) | |
tree | 9f613ed6139732d5c70a2af1d163031b7b40cb0f /gcc/tree.c | |
parent | 7ef52af45236848a5fdbbf645e1883001bf97899 (diff) | |
download | gcc-873c716480f5aedc692af4d4ddf15e72682c5f27.zip gcc-873c716480f5aedc692af4d4ddf15e72682c5f27.tar.gz gcc-873c716480f5aedc692af4d4ddf15e72682c5f27.tar.bz2 |
re PR target/33579 (INIT_PRIORITY is broken)
PR target/33579
* tree.h (DECL_INIT_PRIORITY): Do not require
DECL_HAS_INIT_PRIORITY_P.
(DECL_FINI_PRIORITY): Likewise.
* tree.c (decl_init_priority_lookup): Remove assert.
(decl_fini_priority_insert): Likewise.
* cgraphunit.c (static_ctors): Make it a VEC.
(static_dtors): Likewise.
(record_cdtor_fn): Adjust accordingly.
(build_cdtor): Generate multiple functions for each initialization
priority.
(compare_ctor): New function.
(compare_dtor): Likewise.
(cgraph_build_cdtor_fns): Sort the functions by priority before
calling build_cdtor.
(cgraph_build_static_cdtor): Put the priority in the function's
name.
From-SVN: r129918
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -4306,9 +4306,6 @@ decl_init_priority_lookup (tree decl) struct tree_map_base in; gcc_assert (VAR_OR_FUNCTION_DECL_P (decl)); - gcc_assert (TREE_CODE (decl) == VAR_DECL - ? DECL_HAS_INIT_PRIORITY_P (decl) - : DECL_STATIC_CONSTRUCTOR (decl)); in.from = decl; h = htab_find (init_priority_for_decl, &in); return h ? h->init : DEFAULT_INIT_PRIORITY; @@ -4323,7 +4320,6 @@ decl_fini_priority_lookup (tree decl) struct tree_map_base in; gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); - gcc_assert (DECL_STATIC_DESTRUCTOR (decl)); in.from = decl; h = htab_find (init_priority_for_decl, &in); return h ? h->fini : DEFAULT_INIT_PRIORITY; |