aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-05-30 08:58:57 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-30 08:58:57 +0000
commitb23fa3d45fcdcb42fabdffe4f8f720f070722bdc (patch)
treefe3b1231c3c337d9a883b163011cb387fe1fae12
parent07fb1ef48334827934ea5fd204e31b25398fcf3e (diff)
downloadgcc-b23fa3d45fcdcb42fabdffe4f8f720f070722bdc.zip
gcc-b23fa3d45fcdcb42fabdffe4f8f720f070722bdc.tar.gz
gcc-b23fa3d45fcdcb42fabdffe4f8f720f070722bdc.tar.bz2
[Ada] Unnesting: always transform local Raise statements
2018-05-30 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_ch11.adb (Replace_Raise_By_Goto): The transfomation is legal even if the local raise statement includes a string expression. This expression might be picked up by an outer handler or discarded, but plays no role in this transformation. From-SVN: r260949
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/exp_ch11.adb6
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 528eea4..db17d68 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2018-05-30 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch11.adb (Replace_Raise_By_Goto): The transfomation is legal even
+ if the local raise statement includes a string expression. This
+ expression might be picked up by an outer handler or discarded, but
+ plays no role in this transformation.
+
2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb, exp_unst.adb, freeze.adb, libgnat/a-direct.adb: Minor
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index 4619b36..b197c4e 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -913,13 +913,13 @@ package body Exp_Ch11 is
Cond := Condition (Raise_S);
-- The only other possibility is a node that is or used to be a
- -- simple raise statement.
+ -- simple raise statement. Note that the string expression in
+ -- the original Raise statement is ignored.
else
Orig := Original_Node (Raise_S);
pragma Assert (Nkind (Orig) = N_Raise_Statement
- and then Present (Name (Orig))
- and then No (Expression (Orig)));
+ and then Present (Name (Orig)));
Excep := Entity (Name (Orig));
Cond := Empty;
end if;