Commit a95cd5a0 by Roger Sayle Committed by Roger Sayle

resource.c (write_resource_constructor): Guard call to possibly NULL…

resource.c (write_resource_constructor): Guard call to possibly NULL targetm.asm_out.constructor with...


	* resource.c (write_resource_constructor): Guard call to possibly
	NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.

From-SVN: r81012
parent b10e5b3a
2004-04-22 Roger Sayle <roger@eyesopen.com>
* resource.c (write_resource_constructor): Guard call to possibly
NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2004-04-19 Bryce McKinlay <mckinlay@redhat.com> 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_class_data): Add new field aux_info. * class.c (make_class_data): Add new field aux_info.
......
...@@ -129,6 +129,9 @@ write_resource_constructor (void) ...@@ -129,6 +129,9 @@ write_resource_constructor (void)
to scan the object file to find its ctor/dtor routine. */ to scan the object file to find its ctor/dtor routine. */
TREE_PUBLIC (init_decl) = ! targetm.have_ctors_dtors; TREE_PUBLIC (init_decl) = ! targetm.have_ctors_dtors;
/* Suppress spurious warnings. */
TREE_USED (init_decl) = 1;
pushlevel (0); pushlevel (0);
make_decl_rtl (init_decl, NULL); make_decl_rtl (init_decl, NULL);
init_function_start (init_decl); init_function_start (init_decl);
...@@ -156,8 +159,9 @@ write_resource_constructor (void) ...@@ -156,8 +159,9 @@ write_resource_constructor (void)
flag_inline_functions = saved_flag; flag_inline_functions = saved_flag;
} }
current_function_decl = NULL_TREE; current_function_decl = NULL_TREE;
(* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0), if (targetm.have_ctors_dtors)
DEFAULT_INIT_PRIORITY); targetm.asm_out.constructor (XEXP (DECL_RTL (init_decl), 0),
DEFAULT_INIT_PRIORITY);
input_location = saved_loc; input_location = saved_loc;
} }
......
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