Commit 35b6fdcf by Frank Ch. Eigler Committed by Frank Ch. Eigler

* Fix for g++/15861

2004-07-15  Frank Ch. Eigler  <fche@redhat.com>

	g++/15861
	* cgraphunit.c (cgraph_build_static_cdtor): Add priority argument.
	* cgraph.h: Update declaration.
	* c-decl.c (build_cdtor): Update call with default priority.
	* coverage.c (create_coverage): Ditto.
	* tree-mudflap.c (mf_init_fndecl): New tree.
	(mudflap_init): Set it.
	(mudflap_register_call): Arrange to call __mf_init before the first
	__mf_register call.
	(mudflap_finish_file): Mark the mudflap static initializer as extra
	high priority, to beat all C++ static constructors.

2004-07-15  Frank Ch. Eigler  <fche@redhat.com>

	g++/15861
	* jcf-parse.c (java_emit_static_constructor): Specify default
	priority.

From-SVN: r84760
parent 3e4035f8
2004-07-15 Frank Ch. Eigler <fche@redhat.com>
g++/15861
* cgraphunit.c (cgraph_build_static_cdtor): Add priority argument.
* cgraph.h: Update declaration.
* c-decl.c (build_cdtor): Update call with default priority.
* coverage.c (create_coverage): Ditto.
* tree-mudflap.c (mf_init_fndecl): New tree.
(mudflap_init): Set it.
(mudflap_register_call): Arrange to call __mf_init before the first
__mf_register call.
(mudflap_finish_file): Mark the mudflap static initializer as extra
high priority, to beat all C++ static constructors.
2004-07-15 Jeff Law <law@redhat.com> 2004-07-15 Jeff Law <law@redhat.com>
* loop.c (check_insn_for_givs): Restore check for code labels that was * loop.c (check_insn_for_givs): Restore check for code labels that was
......
...@@ -6616,7 +6616,7 @@ build_cdtor (int method_type, tree cdtors) ...@@ -6616,7 +6616,7 @@ build_cdtor (int method_type, tree cdtors)
append_to_statement_list (build_function_call (TREE_VALUE (cdtors), 0), append_to_statement_list (build_function_call (TREE_VALUE (cdtors), 0),
&body); &body);
cgraph_build_static_cdtor (method_type, body); cgraph_build_static_cdtor (method_type, body, DEFAULT_INIT_PRIORITY);
} }
/* Perform final processing on one file scope's declarations (or the /* Perform final processing on one file scope's declarations (or the
......
...@@ -192,6 +192,6 @@ void verify_cgraph (void); ...@@ -192,6 +192,6 @@ void verify_cgraph (void);
void verify_cgraph_node (struct cgraph_node *); void verify_cgraph_node (struct cgraph_node *);
void cgraph_mark_inline_edge (struct cgraph_edge *e); void cgraph_mark_inline_edge (struct cgraph_edge *e);
void cgraph_clone_inlined_nodes (struct cgraph_edge *e, bool duplicate); void cgraph_clone_inlined_nodes (struct cgraph_edge *e, bool duplicate);
void cgraph_build_static_cdtor (char which, tree body); void cgraph_build_static_cdtor (char which, tree body, int priority);
#endif /* GCC_CGRAPH_H */ #endif /* GCC_CGRAPH_H */
...@@ -1792,7 +1792,7 @@ cgraph_optimize (void) ...@@ -1792,7 +1792,7 @@ cgraph_optimize (void)
GENERIC statements. */ GENERIC statements. */
void void
cgraph_build_static_cdtor (char which, tree body) cgraph_build_static_cdtor (char which, tree body, int priority)
{ {
static int counter = 0; static int counter = 0;
char which_buf[16]; char which_buf[16];
...@@ -1846,6 +1846,6 @@ cgraph_build_static_cdtor (char which, tree body) ...@@ -1846,6 +1846,6 @@ cgraph_build_static_cdtor (char which, tree body)
fn = targetm.asm_out.constructor; fn = targetm.asm_out.constructor;
else else
fn = targetm.asm_out.destructor; fn = targetm.asm_out.destructor;
fn (XEXP (DECL_RTL (decl), 0), DEFAULT_INIT_PRIORITY); fn (XEXP (DECL_RTL (decl), 0), priority);
} }
} }
...@@ -939,7 +939,7 @@ create_coverage (void) ...@@ -939,7 +939,7 @@ create_coverage (void)
append_to_statement_list (t, &body); append_to_statement_list (t, &body);
/* Generate a constructor to run it. */ /* Generate a constructor to run it. */
cgraph_build_static_cdtor ('I', body); cgraph_build_static_cdtor ('I', body, DEFAULT_INIT_PRIORITY);
} }
/* Perform file-level initialization. Read in data file, generate name /* Perform file-level initialization. Read in data file, generate name
......
2004-07-15 Frank Ch. Eigler <fche@redhat.com>
g++/15861
* jcf-parse.c (java_emit_static_constructor): Specify default
priority.
2004-07-13 Per Bothner <per@bothner.com> 2004-07-13 Per Bothner <per@bothner.com>
* java-tree.h (all_class_filename): Remove useless macro. * java-tree.h (all_class_filename): Remove useless macro.
......
...@@ -887,7 +887,7 @@ java_emit_static_constructor (void) ...@@ -887,7 +887,7 @@ java_emit_static_constructor (void)
write_resource_constructor (&body); write_resource_constructor (&body);
if (body) if (body)
cgraph_build_static_cdtor ('I', body); cgraph_build_static_cdtor ('I', body, DEFAULT_INIT_PRIORITY);
} }
void void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment