From: Javier Miranda Date: Sat, 25 Jul 2020 17:16:32 +0000 (-0400) Subject: [Ada] Spurious error in taft ammendment derivation of CPP type X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ac38961bad550e8054eff14466fdc8884bee1502;p=gcc.git [Ada] Spurious error in taft ammendment derivation of CPP type gcc/ada/ * sem_ch3.adb (Build_Derived_Type): Propagate convention of class-wide parent. --- diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index be5ed671450..a8baad99d6b 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -9751,6 +9751,13 @@ package body Sem_Ch3 is Set_Convention (Derived_Type, Convention (Parent_Base)); + if Is_Tagged_Type (Derived_Type) + and then Present (Class_Wide_Type (Derived_Type)) + then + Set_Convention (Class_Wide_Type (Derived_Type), + Convention (Class_Wide_Type (Parent_Base))); + end if; + -- Set SSO default for record or array type if (Is_Array_Type (Derived_Type) or else Is_Record_Type (Derived_Type))