From: Ed Schonberg Date: Wed, 30 May 2018 08:58:57 +0000 (+0000) Subject: [Ada] Unnesting: always transform local Raise statements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b23fa3d45fcdcb42fabdffe4f8f720f070722bdc;p=gcc.git [Ada] Unnesting: always transform local Raise statements 2018-05-30 Ed Schonberg 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 528eea4eaa2..db17d684e76 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2018-05-30 Ed Schonberg + + * 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 * 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 4619b36bb64..b197c4e7959 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;