This was broken in Ada by recent callgraph/varpool changes.

Tested on x86_64-suse-linux, applied on the mainline and 4.9 branch.


2014-05-18  Eric Botcazou  <ebotca...@adacore.com>

        * utils.c (gnat_write_global_declarations): Adjust the flags put on
        dummy_global.


-- 
Eric Botcazou
Index: gcc-interface/utils.c
===================================================================
--- gcc-interface/utils.c	(revision 210579)
+++ gcc-interface/utils.c	(working copy)
@@ -5756,9 +5756,10 @@ gnat_write_global_declarations (void)
       dummy_global
 	= build_decl (BUILTINS_LOCATION, VAR_DECL, get_identifier (label),
 		      void_type_node);
+      DECL_HARD_REGISTER (dummy_global) = 1;
       TREE_STATIC (dummy_global) = 1;
-      TREE_ASM_WRITTEN (dummy_global) = 1;
       node = varpool_node_for_decl (dummy_global);
+      node->definition = 1;
       node->force_output = 1;
 
       while (!types_used_by_cur_var_decl->is_empty ())

Reply via email to