From 7ba8725fc35c88d8e049ffd6b3e206b747588419 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 8 Mar 2021 07:11:32 -0500 Subject: [PATCH] [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. --- 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 6720d41..d807b10 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 -- 2.7.4