aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-05-28 08:55:57 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-28 08:55:57 +0000
commit6af9261c73519a4c3e1a26376dc0b156ecd4aad6 (patch)
tree10baa5298e6320034dce95205e518d76fb623ec8 /gcc
parentbcad5029a8e4977013d7fadc133f22fbdf8dd99d (diff)
downloadgcc-6af9261c73519a4c3e1a26376dc0b156ecd4aad6.zip
gcc-6af9261c73519a4c3e1a26376dc0b156ecd4aad6.tar.gz
gcc-6af9261c73519a4c3e1a26376dc0b156ecd4aad6.tar.bz2
[Ada] Unnesting: allow uplevel references to exceptions
2018-05-28 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus they can appear as components of activation records. * exp_unst.adb (Visit_Node): A reference to an exception may be an uplevel reference. From-SVN: r260840
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/einfo.adb2
-rw-r--r--gcc/ada/einfo.ads1
-rw-r--r--gcc/ada/exp_unst.adb5
4 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 79df7a6..91ea8ec 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2018-05-28 Ed Schonberg <schonberg@adacore.com>
+
+ * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
+ they can appear as components of activation records.
+ * exp_unst.adb (Visit_Node): A reference to an exception may be an
+ uplevel reference.
+
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 8ff9562..fd77d41 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -744,6 +744,7 @@ package body Einfo is
begin
pragma Assert (Ekind_In (Id, E_Constant,
E_Discriminant,
+ E_Exception,
E_In_Parameter,
E_In_Out_Parameter,
E_Loop_Parameter,
@@ -3958,6 +3959,7 @@ package body Einfo is
begin
pragma Assert (Ekind_In (Id, E_Constant,
E_Discriminant,
+ E_Exception,
E_In_Parameter,
E_In_Out_Parameter,
E_Loop_Parameter,
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index 78504bb..665d578 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -6106,6 +6106,7 @@ package Einfo is
-- Renamed_Entity (Node18)
-- Register_Exception_Call (Node20)
-- Interface_Name (Node21)
+ -- Activation_Record_Component (Node31)
-- Discard_Names (Flag88)
-- Is_Raised (Flag224)
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index f6d7650..81f2a61 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -798,9 +798,10 @@ package body Exp_Unst is
and then Chars (Enclosing_Subprogram (Ent)) /= Name_uParent
and then
- -- Constants and variables are interesting
+ -- Constants, variables and exceptions are potentially
+ -- uplevel references to global declarations.
- (Ekind_In (Ent, E_Constant, E_Variable)
+ (Ekind_In (Ent, E_Constant, E_Exception, E_Variable)
-- Formals are interesting, but not if being used as mere
-- names of parameters for name notation calls.