aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2009-04-21 07:27:26 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-04-21 07:27:26 +0000
commita962b0a184bd0ec65f09de619f4d4555b0e1d965 (patch)
tree55f9187c0b6f69afbb0bd905dfd069a6e794ec8a /gcc/ada/gcc-interface
parent2f283818fcf75a4e94037882f3d305dea89f3a74 (diff)
downloadgcc-a962b0a184bd0ec65f09de619f4d4555b0e1d965.zip
gcc-a962b0a184bd0ec65f09de619f4d4555b0e1d965.tar.gz
gcc-a962b0a184bd0ec65f09de619f4d4555b0e1d965.tar.bz2
decl.c (gnat_to_gnu_entity): Do not set force_global for imported subprograms.
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not set force_global for imported subprograms. From-SVN: r146469
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/decl.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 18ebeff..898af24 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -332,13 +332,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
another compilation unit) public entities, show we are at global level
for the purpose of computing scopes. Don't do this for components or
discriminants since the relevant test is whether or not the record is
- being defined. But do this for Imported functions or procedures in
- all cases. */
- if ((!definition && Is_Public (gnat_entity)
- && !Is_Statically_Allocated (gnat_entity)
- && kind != E_Discriminant && kind != E_Component)
- || (Is_Imported (gnat_entity)
- && (kind == E_Function || kind == E_Procedure)))
+ being defined. */
+ if (!definition
+ && Is_Public (gnat_entity)
+ && !Is_Statically_Allocated (gnat_entity)
+ && kind != E_Component
+ && kind != E_Discriminant)
force_global++, this_global = true;
/* Handle any attributes directly attached to the entity. */