aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-06-11 08:34:44 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-06-11 08:34:44 +0000
commit9083aacd090fc35f85659bdaa812384779ef73e2 (patch)
treeee4cd62633fa310c78b4c77fb3f1bdca4a4fae92 /gcc/ada/gcc-interface/utils.c
parent9cbad0a3624eb087ff3c05457aa41d5c595f5a85 (diff)
downloadgcc-9083aacd090fc35f85659bdaa812384779ef73e2.zip
gcc-9083aacd090fc35f85659bdaa812384779ef73e2.tar.gz
gcc-9083aacd090fc35f85659bdaa812384779ef73e2.tar.bz2
decl.c (gnat_to_gnu_entity): Do not specifically deal with external constants wrt force_global here...
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not specifically deal with external constants wrt force_global here... <E_Constant>: ...but here instead. * gcc-interface/utils.c (gnat_pushdecl): Do not put external DECLs onto the list of global DECLs. From-SVN: r188379
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 5800308..db909d9 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -572,14 +572,14 @@ gnat_pushdecl (tree decl, Node_Id gnat_node)
if (!(TREE_CODE (decl) == TYPE_DECL
&& TREE_CODE (TREE_TYPE (decl)) == UNCONSTRAINED_ARRAY_TYPE))
{
- if (global_bindings_p ())
+ if (DECL_EXTERNAL (decl))
{
- VEC_safe_push (tree, gc, global_decls, decl);
-
if (TREE_CODE (decl) == FUNCTION_DECL && DECL_BUILT_IN (decl))
VEC_safe_push (tree, gc, builtin_decls, decl);
}
- else if (!DECL_EXTERNAL (decl))
+ else if (global_bindings_p ())
+ VEC_safe_push (tree, gc, global_decls, decl);
+ else
{
DECL_CHAIN (decl) = BLOCK_VARS (current_binding_level->block);
BLOCK_VARS (current_binding_level->block) = decl;