diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-05-30 08:58:57 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-05-30 08:58:57 +0000 |
commit | b23fa3d45fcdcb42fabdffe4f8f720f070722bdc (patch) | |
tree | fe3b1231c3c337d9a883b163011cb387fe1fae12 | |
parent | 07fb1ef48334827934ea5fd204e31b25398fcf3e (diff) | |
download | gcc-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/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/exp_ch11.adb | 6 |
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; |