46 lines
1.7 KiB
Diff
46 lines
1.7 KiB
Diff
Index: semantics.c
|
|
===================================================================
|
|
RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
|
|
retrieving revision 1.282.2.13
|
|
diff -u -p -r1.282.2.13 semantics.c
|
|
--- gcc/cp/semantics.c 5 May 2004 13:05:50 -0000 1.282.2.13
|
|
+++ gcc/cp/semantics.c 1 Oct 2004 13:21:06 -0000
|
|
@@ -2455,6 +2455,18 @@ expand_or_defer_fn (fn)
|
|
if (flag_unit_at_a_time && cgraph_global_info_ready)
|
|
abort ();
|
|
|
|
+ /* If this function is marked with the constructor attribute, add it
|
|
+ to the list of functions to be called along with constructors
|
|
+ from static duration objects. */
|
|
+ if (DECL_STATIC_CONSTRUCTOR (fn))
|
|
+ static_ctors = tree_cons (NULL_TREE, fn, static_ctors);
|
|
+
|
|
+ /* If this function is marked with the destructor attribute, add it
|
|
+ to the list of functions to be called along with destructors from
|
|
+ static duration objects. */
|
|
+ if (DECL_STATIC_DESTRUCTOR (fn))
|
|
+ static_dtors = tree_cons (NULL_TREE, fn, static_dtors);
|
|
+
|
|
if (flag_unit_at_a_time && !cgraph_global_info_ready)
|
|
{
|
|
if (at_eof)
|
|
@@ -2673,18 +2685,6 @@ genrtl_finish_function (fn)
|
|
if (ctype && TREE_ASM_WRITTEN (fn))
|
|
note_debug_info_needed (ctype);
|
|
#endif
|
|
-
|
|
- /* If this function is marked with the constructor attribute, add it
|
|
- to the list of functions to be called along with constructors
|
|
- from static duration objects. */
|
|
- if (DECL_STATIC_CONSTRUCTOR (fn))
|
|
- static_ctors = tree_cons (NULL_TREE, fn, static_ctors);
|
|
-
|
|
- /* If this function is marked with the destructor attribute, add it
|
|
- to the list of functions to be called along with destructors from
|
|
- static duration objects. */
|
|
- if (DECL_STATIC_DESTRUCTOR (fn))
|
|
- static_dtors = tree_cons (NULL_TREE, fn, static_dtors);
|
|
|
|
--function_depth;
|
|
|