+2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
+ dummy global built for global types is preserved.
+
2012-02-27 Tristan Gingold <gingold@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
the global hash table. We use a dummy variable for this purpose. */
if (!VEC_empty (tree, types_used_by_cur_var_decl))
{
+ struct varpool_node *node;
dummy_global
= build_decl (BUILTINS_LOCATION, VAR_DECL, NULL_TREE, void_type_node);
TREE_STATIC (dummy_global) = 1;
TREE_ASM_WRITTEN (dummy_global) = 1;
- varpool_mark_needed_node (varpool_node (dummy_global));
+ node = varpool_node (dummy_global);
+ node->force_output = 1;
+ varpool_mark_needed_node (node);
while (!VEC_empty (tree, types_used_by_cur_var_decl))
{