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
This commit is contained in:
parent
1edaa8b7e8
commit
35e8bcf454
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
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,
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue