From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 02AE0395B820; Thu, 17 Jun 2021 14:35:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02AE0395B820 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-1598] [Ada] Crash on overriding of an abstract primitive on an incomplete type X-Act-Checkin: gcc X-Git-Author: Arnaud Charlet X-Git-Refname: refs/heads/master X-Git-Oldrev: 59d5d8cdb95479231e675a03e5baec955b7095c2 X-Git-Newrev: 7ba8725fc35c88d8e049ffd6b3e206b747588419 Message-Id: <20210617143522.02AE0395B820@sourceware.org> Date: Thu, 17 Jun 2021 14:35:22 +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: Thu, 17 Jun 2021 14:35:22 -0000 https://gcc.gnu.org/g:7ba8725fc35c88d8e049ffd6b3e206b747588419 commit r12-1598-g7ba8725fc35c88d8e049ffd6b3e206b747588419 Author: Arnaud Charlet Date: Mon Mar 8 07:11:32 2021 -0500 [Ada] Crash on overriding of an abstract primitive on an incomplete type gcc/ada/ * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Protect against no Primitive_Operations. Diff: --- gcc/ada/sem_ch3.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 6720d41c221..d807b10c2f0 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -3072,6 +3072,7 @@ package body Sem_Ch3 is and then Ekind (Prev) = E_Incomplete_Type and then Is_Tagged_Type (Prev) and then Is_Tagged_Type (T) + and then Present (Primitive_Operations (Prev)) then Elmt := First_Elmt (Primitive_Operations (Prev)); while Present (Elmt) loop