diff options
Diffstat (limited to 'gcc/ada/exp_ch11.adb')
-rw-r--r-- | gcc/ada/exp_ch11.adb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb index d45cb45..abc91a2 100644 --- a/gcc/ada/exp_ch11.adb +++ b/gcc/ada/exp_ch11.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1426,9 +1426,9 @@ package body Exp_Ch11 is -- objects of controlled types, for example. We do not want to clean up -- the return object. - if not Nkind_In (Parent (N), N_Accept_Statement, - N_Extended_Return_Statement, - N_Package_Body) + if Nkind (Parent (N)) not in N_Accept_Statement + | N_Extended_Return_Statement + | N_Package_Body and then not Delay_Cleanups (Current_Scope) and then not Is_Thunk (Current_Scope) then @@ -1505,7 +1505,7 @@ package body Exp_Ch11 is Actions => New_List ( Make_Simple_Return_Statement (Loc, Expression => New_Occurrence_Of (Standard_False, Loc))), - Expression => RCE)); + Expression => RCE)); else Rewrite (N, @@ -1514,7 +1514,7 @@ package body Exp_Ch11 is Make_Raise_Statement (Loc, Name => Name (N), Expression => Expression (N))), - Expression => RCE)); + Expression => RCE)); end if; Analyze_And_Resolve (N, Typ); |