Message ID | 20220517082739.GA1089177@adacore.com |
---|---|
State | New |
Headers | show |
Series | [Ada] Don't create calls to Abort_Undefer when not Abort_Allowed | expand |
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -7812,7 +7812,9 @@ package body Exp_Ch9 is Hdle := New_List (Build_Abort_Block_Handler (Loc)); - Prepend_To (Astats, Build_Runtime_Call (Loc, RE_Abort_Undefer)); + if Abort_Allowed then + Prepend_To (Astats, Build_Runtime_Call (Loc, RE_Abort_Undefer)); + end if; Abortable_Block := Make_Block_Statement (Loc,