From: Arnaud Charlet Date: Mon, 8 Mar 2021 12:11:32 +0000 (-0500) Subject: [Ada] Crash on overriding of an abstract primitive on an incomplete type X-Git-Tag: basepoints/gcc-13~6715 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ba8725fc35c88d8e049ffd6b3e206b747588419;p=thirdparty%2Fgcc.git [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 --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 6720d41c2211..d807b10c2f07 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