aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-02-29 11:41:07 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-02-29 11:41:07 +0000
commit35e8bcf454d87488314530a6b8b3ab515c587de3 (patch)
tree9b35df5ef45d5017c10909a673da1312537ecd35 /gcc/ada/gcc-interface/utils.c
parent1edaa8b7e8213a4c89a84e3ea986257d726b39bf (diff)
downloadgcc-35e8bcf454d87488314530a6b8b3ab515c587de3.zip
gcc-35e8bcf454d87488314530a6b8b3ab515c587de3.tar.gz
gcc-35e8bcf454d87488314530a6b8b3ab515c587de3.tar.bz2
utils.c (gnat_write_global_declarations): Make sure the dummy global built for global types is preserved.
* gcc-interface/utils.c (gnat_write_global_declarations): Make sure the dummy global built for global types is preserved. From-SVN: r184659
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 33d11ef..ab405db 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -4892,11 +4892,14 @@ gnat_write_global_declarations (void)
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))
{