From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 5797D3858416; Tue, 9 Nov 2021 09:45:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5797D3858416 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 r12-5015] [Ada] Build activation chain for BIP only when needed X-Act-Checkin: gcc X-Git-Author: Etienne Servais X-Git-Refname: refs/heads/master X-Git-Oldrev: 6b8b959675a3e14cfdd2145bd62e4260eb193765 X-Git-Newrev: 74e514af79c4e01a6ff7fab4b7c7a79cad058c3c Message-Id: <20211109094524.5797D3858416@sourceware.org> Date: Tue, 9 Nov 2021 09:45:24 +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, 09 Nov 2021 09:45:24 -0000 https://gcc.gnu.org/g:74e514af79c4e01a6ff7fab4b7c7a79cad058c3c commit r12-5015-g74e514af79c4e01a6ff7fab4b7c7a79cad058c3c Author: Etienne Servais Date: Wed Sep 22 17:20:27 2021 +0200 [Ada] Build activation chain for BIP only when needed gcc/ada/ * exp_ch6.adb (Expand_Actuals): Add a condition to check for the possibility of task. Diff: --- gcc/ada/exp_ch6.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 6015993fbc5..fa1a89a0c64 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -2292,8 +2292,11 @@ package body Exp_Ch6 is null; elsif Is_Build_In_Place_Function_Call (Actual) then - Build_Activation_Chain_Entity (N); - Build_Master_Entity (Etype (Actual)); + if Might_Have_Tasks (Etype (Actual)) then + Build_Activation_Chain_Entity (N); + Build_Master_Entity (Etype (Actual)); + end if; + Make_Build_In_Place_Call_In_Anonymous_Context (Actual); -- Ada 2005 (AI-318-02): Specialization of the previous case for