Commit 5225a138 by Eric Botcazou

utils.c (create_var_decl_1): Do not emit debug info for an external constant…

utils.c (create_var_decl_1): Do not emit debug info for an external constant whose initializer is not absolute.

	* gcc-interface/utils.c (create_var_decl_1): Do not emit debug info
	for an external constant whose initializer is not absolute.

From-SVN: r146620
parent 89043e8a
2009-04-21 Taras Glek <tglek@mozilla.com> 2009-04-22 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (create_var_decl_1): Do not emit debug info
for an external constant whose initializer is not absolute.
2009-04-22 Taras Glek <tglek@mozilla.com>
* gcc-interface/ada-tree.h: Update GTY annotations to new syntax. * gcc-interface/ada-tree.h: Update GTY annotations to new syntax.
* gcc-interface/trans.c: Likewise. * gcc-interface/trans.c: Likewise.
......
...@@ -1347,6 +1347,15 @@ create_var_decl_1 (tree var_name, tree asm_name, tree type, tree var_init, ...@@ -1347,6 +1347,15 @@ create_var_decl_1 (tree var_name, tree asm_name, tree type, tree var_init,
TREE_STATIC (var_decl) TREE_STATIC (var_decl)
= !extern_flag && (public_flag || static_flag || global_bindings_p ()); = !extern_flag && (public_flag || static_flag || global_bindings_p ());
/* For an external constant whose initializer is not absolute, do not emit
debug info. In DWARF this would mean a global relocation in a read-only
section which runs afoul of the PE-COFF runtime relocation mechanism. */
if (extern_flag
&& constant_p
&& initializer_constant_valid_p (var_init, TREE_TYPE (var_init))
!= null_pointer_node)
DECL_IGNORED_P (var_decl) = 1;
if (asm_name && VAR_OR_FUNCTION_DECL_P (var_decl)) if (asm_name && VAR_OR_FUNCTION_DECL_P (var_decl))
SET_DECL_ASSEMBLER_NAME (var_decl, asm_name); SET_DECL_ASSEMBLER_NAME (var_decl, asm_name);
......
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