aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-07-16 14:12:09 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-07-16 14:12:09 +0000
commit4dd2ed1495378681b58c2e7ff5c1cc5511882a2d (patch)
treeb8d9e0899933266952d576232b7d084be12c8ad9 /gcc
parentfa42563af97ed3d3a77f580b8dccf9a61222ca4a (diff)
downloadgcc-4dd2ed1495378681b58c2e7ff5c1cc5511882a2d.zip
gcc-4dd2ed1495378681b58c2e7ff5c1cc5511882a2d.tar.gz
gcc-4dd2ed1495378681b58c2e7ff5c1cc5511882a2d.tar.bz2
[Ada] Unnesting: handle 'Address references that are calls
2018-07-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_unst.adb (Visit_Node): Handle 'Address references that are calls. From-SVN: r262726
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/exp_unst.adb4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 13428e9..8b79b00 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2018-07-16 Ed Schonberg <schonberg@adacore.com>
+ * exp_unst.adb (Visit_Node): Handle 'Address references that are
+ calls.
+
+2018-07-16 Ed Schonberg <schonberg@adacore.com>
+
* exp_unst.adb (Visit_Node): Handle the semantic of Storage_Pool field
in relevant nodes: Allocate, Free, and return statements.
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index 464eaa0..ef5ab4a 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -859,7 +859,8 @@ package body Exp_Unst is
end;
end if;
- -- A 'Access reference is a (potential) call. Other attributes
+ -- A 'Access reference is a (potential) call. So is 'Address,
+ -- in particular on imported subprograms. Other attributes
-- require special handling.
when N_Attribute_Reference =>
@@ -871,6 +872,7 @@ package body Exp_Unst is
when Attribute_Access
| Attribute_Unchecked_Access
| Attribute_Unrestricted_Access
+ | Attribute_Address
=>
if Nkind (Prefix (N)) in N_Has_Entity then
Ent := Entity (Prefix (N));