From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 8DC2E385800E; Tue, 9 Nov 2021 09:45:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DC2E385800E 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-5017] [Ada] Fix support for prefixed call with incomplete type declarations X-Act-Checkin: gcc X-Git-Author: Yannick Moy X-Git-Refname: refs/heads/master X-Git-Oldrev: 9c8bb4d68240c2449c8ec9532f683cdad5bbbdbd X-Git-Newrev: ca803c3d7ba5c6626d37e615aec1748ac4199c9b Message-Id: <20211109094534.8DC2E385800E@sourceware.org> Date: Tue, 9 Nov 2021 09:45:34 +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:34 -0000 https://gcc.gnu.org/g:ca803c3d7ba5c6626d37e615aec1748ac4199c9b commit r12-5017-gca803c3d7ba5c6626d37e615aec1748ac4199c9b Author: Yannick Moy Date: Mon Oct 25 12:48:22 2021 +0200 [Ada] Fix support for prefixed call with incomplete type declarations gcc/ada/ * sem_ch3.adb (Analyze_Incomplete_Type_Decl): Add the missing initialization. Diff: --- gcc/ada/sem_ch3.adb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 152ef83387d..ff3da385943 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -3506,6 +3506,15 @@ package body Sem_Ch3 is Set_Is_Tagged_Type (T, True); Set_No_Tagged_Streams_Pragma (T, No_Tagged_Streams); Make_Class_Wide_Type (T); + end if; + + -- For tagged types, or when prefixed-call syntax is allowed for + -- untagged types, initialize the list of primitive operations to + -- an empty list. + + if Tagged_Present (N) + or else Extensions_Allowed + then Set_Direct_Primitive_Operations (T, New_Elmt_List); end if;