From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 9B90A3857409; Tue, 17 May 2022 08:28:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B90A3857409 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-532] [Ada] Don't create calls to Abort_Undefer when not Abort_Allowed X-Act-Checkin: gcc X-Git-Author: Ghjuvan Lacambre X-Git-Refname: refs/heads/master X-Git-Oldrev: 98208e364c10f71a1609b93959cc81e1e2549163 X-Git-Newrev: 6e2d6b8e8ead146f6d7e314c9d6763bbefc7459b Message-Id: <20220517082823.9B90A3857409@sourceware.org> Date: Tue, 17 May 2022 08:28:23 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2022 08:28:23 -0000 https://gcc.gnu.org/g:6e2d6b8e8ead146f6d7e314c9d6763bbefc7459b commit r13-532-g6e2d6b8e8ead146f6d7e314c9d6763bbefc7459b Author: Ghjuvan Lacambre Date: Tue Mar 15 10:57:45 2022 +0100 [Ada] Don't create calls to Abort_Undefer when not Abort_Allowed Prevent creation of references to Abort_Undefer when aborts aren't allowed. Another solution could have been an early return at Expand_N_Asynchronous_Select's beginning, but this would break backends that currently expect trees that do not contain any N_Asynchronous_Selects in their AST (e.g. CodePeer). gcc/ada/ * exp_ch9.adb (Expand_N_Asynchronous_Select): Don't generate Abort_Undefers when not Abort_Allowed. Diff: --- gcc/ada/exp_ch9.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index f7067805979..0e551ab868c 100644 --- 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,