diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-10-16 19:53:40 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-11-25 08:22:45 -0500 |
commit | 57966b4d2f8adaf0d9af12e07a8ee32cd4184bcc (patch) | |
tree | 9cd4535852d955da17ec6016e068ac4995c2dd0e /gcc/ada/exp_ch11.adb | |
parent | 7a17384884750622969e01b90344f6aa4fc9838c (diff) | |
download | gcc-57966b4d2f8adaf0d9af12e07a8ee32cd4184bcc.zip gcc-57966b4d2f8adaf0d9af12e07a8ee32cd4184bcc.tar.gz gcc-57966b4d2f8adaf0d9af12e07a8ee32cd4184bcc.tar.bz2 |
[Ada] Fix couple of minor issues with local exception propagation
gcc/ada/
* exp_ch11.adb (Expand_N_Raise_Statement): Use Is_Entity_Name
consistently in tests on the name of the statement.
* exp_prag.adb (Expand_Pragma_Check): In the local propagation
case, wrap the raise statement in a block statement.
Diffstat (limited to 'gcc/ada/exp_ch11.adb')
-rw-r--r-- | gcc/ada/exp_ch11.adb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb index abc91a2..ddd69df 100644 --- a/gcc/ada/exp_ch11.adb +++ b/gcc/ada/exp_ch11.adb @@ -1553,7 +1553,7 @@ package body Exp_Ch11 is begin -- Processing for locally handled exception (exclude reraise case) - if Present (Name (N)) and then Nkind (Name (N)) = N_Identifier then + if Present (Name (N)) and then Is_Entity_Name (Name (N)) then if Debug_Flag_Dot_G or else Restriction_Active (No_Exception_Propagation) then @@ -1657,7 +1657,7 @@ package body Exp_Ch11 is -- but this is also faster in all modes). Propagate Comes_From_Source -- flag to the new node. - if Present (Name (N)) and then Nkind (Name (N)) = N_Identifier then + if Present (Name (N)) and then Is_Entity_Name (Name (N)) then Src := Comes_From_Source (N); if Entity (Name (N)) = Standard_Constraint_Error then @@ -1689,7 +1689,7 @@ package body Exp_Ch11 is -- where location_string identifies the file/line of the raise - if Present (Name (N)) then + if Present (Name (N)) and then Is_Entity_Name (Name (N)) then declare Id : Entity_Id := Entity (Name (N)); Buf : Bounded_String; |