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>
* loop.c (check_insn_for_givs): Restore check for code labels that was
......
......@@ -6616,7 +6616,7 @@ build_cdtor (int method_type, tree cdtors)
append_to_statement_list (build_function_call (TREE_VALUE (cdtors), 0),
&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
......
......@@ -192,6 +192,6 @@ void verify_cgraph (void);
void verify_cgraph_node (struct cgraph_node *);
void cgraph_mark_inline_edge (struct cgraph_edge *e);
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 */
......@@ -1792,7 +1792,7 @@ cgraph_optimize (void)
GENERIC statements. */
void
cgraph_build_static_cdtor (char which, tree body)
cgraph_build_static_cdtor (char which, tree body, int priority)
{
static int counter = 0;
char which_buf[16];
......@@ -1846,6 +1846,6 @@ cgraph_build_static_cdtor (char which, tree body)
fn = targetm.asm_out.constructor;
else
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)
append_to_statement_list (t, &body);
/* 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
......
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>
* java-tree.h (all_class_filename): Remove useless macro.
......
......@@ -887,7 +887,7 @@ java_emit_static_constructor (void)
write_resource_constructor (&body);
if (body)
cgraph_build_static_cdtor ('I', body);
cgraph_build_static_cdtor ('I', body, DEFAULT_INIT_PRIORITY);
}
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