From ac38961bad550e8054eff14466fdc8884bee1502 Mon Sep 17 00:00:00 2001 From: Javier Miranda Date: Sat, 25 Jul 2020 13:16:32 -0400 Subject: [PATCH] [Ada] Spurious error in taft ammendment derivation of CPP type gcc/ada/ * sem_ch3.adb (Build_Derived_Type): Propagate convention of class-wide parent. --- gcc/ada/sem_ch3.adb | 7 +++++++ 1 file changed, 7 insertions(+) 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)) -- 2.30.2