From: Yannick Moy Date: Mon, 25 Oct 2021 10:48:22 +0000 (+0200) Subject: [Ada] Fix support for prefixed call with incomplete type declarations X-Git-Tag: basepoints/gcc-13~3296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca803c3d7ba5c6626d37e615aec1748ac4199c9b;p=thirdparty%2Fgcc.git [Ada] Fix support for prefixed call with incomplete type declarations gcc/ada/ * sem_ch3.adb (Analyze_Incomplete_Type_Decl): Add the missing initialization. --- diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 152ef83387dc..ff3da3859437 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;