re PR target/33579 (INIT_PRIORITY is broken)
authorMark Mitchell <mark@codesourcery.com>
Tue, 6 Nov 2007 00:30:52 +0000 (00:30 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 6 Nov 2007 00:30:52 +0000 (00:30 +0000)
commit873c716480f5aedc692af4d4ddf15e72682c5f27
tree9f613ed6139732d5c70a2af1d163031b7b40cb0f
parent7ef52af45236848a5fdbbf645e1883001bf97899
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
gcc/ChangeLog
gcc/cgraphunit.c
gcc/tree.c
gcc/tree.h