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.h | |
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.h')
-rw-r--r-- | gcc/tree.h | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -3144,16 +3144,15 @@ extern void decl_fini_priority_insert (tree, priority_type); #define DECL_HAS_INIT_PRIORITY_P(NODE) \ (VAR_DECL_CHECK (NODE)->decl_with_vis.init_priority_p) -/* For a VAR_DECL or FUNCTION_DECL with DECL_HAS_INIT_PRIORITY_P set, - the initialization priority of NODE. */ +/* For a VAR_DECL or FUNCTION_DECL the initialization priority of + NODE. */ #define DECL_INIT_PRIORITY(NODE) \ (decl_init_priority_lookup (NODE)) /* Set the initialization priority for NODE to VAL. */ #define SET_DECL_INIT_PRIORITY(NODE, VAL) \ (decl_init_priority_insert (NODE, VAL)) -/* For a FUNCTION_DECL with DECL_HAS_INIT_PRIORITY_P set, the - finalization priority of NODE. */ +/* For a FUNCTION_DECL the finalization priority of NODE. */ #define DECL_FINI_PRIORITY(NODE) \ (decl_fini_priority_lookup (NODE)) /* Set the finalization priority for NODE to VAL. */ |