https://gcc.gnu.org/g:0ea1e40f4df8505315c70a529a32660ce0385550

commit r16-8977-g0ea1e40f4df8505315c70a529a32660ce0385550
Author: Javier Miranda <[email protected]>
Date:   Mon Jan 12 13:48:04 2026 +0000

    ada: Handle call to C++ constructor in generic instantiation
    
    Add missing support for C++ constructor call passed as a generic
    formal subprogram parameter.
    
    gcc/ada/ChangeLog:
    
            * sem_ch3.adb (Analyze_Subtype_Declaration): Record subtypes
            inherit the CPP_Class attribute; required for instantiations.

Diff:
---
 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 d5b91ffcf0f1..390a4f6093d7 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -6034,6 +6034,7 @@ package body Sem_Ch3 is
                   Set_No_Tagged_Streams_Pragma
                                         (Id, No_Tagged_Streams_Pragma (T));
                   Set_Is_Abstract_Type  (Id, Is_Abstract_Type (T));
+                  Set_Is_CPP_Class      (Id, Is_CPP_Class (T));
                   Set_Class_Wide_Type   (Id, Class_Wide_Type (T));
 
                   if Is_Interface (T) then

Reply via email to