diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-04-21 07:27:26 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-04-21 07:27:26 +0000 |
commit | a962b0a184bd0ec65f09de619f4d4555b0e1d965 (patch) | |
tree | 55f9187c0b6f69afbb0bd905dfd069a6e794ec8a /gcc/ada | |
parent | 2f283818fcf75a4e94037882f3d305dea89f3a74 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 13 |
2 files changed, 11 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d771e98..3b93881 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2009-04-21 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set force_global + for imported subprograms. + +2009-04-21 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not make constant objects covered by 13.3(19) volatile. 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. */ |