]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Handle call to C++ constructor in generic instantiation
authorJavier Miranda <miranda@adacore.com>
Mon, 12 Jan 2026 13:48:04 +0000 (13:48 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 25 May 2026 08:28:09 +0000 (10:28 +0200)
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.

gcc/ada/sem_ch3.adb

index c8d8456dc722e7627012f59b70c2963436211c94..b26a6ca70ea02898b125c6cc1c4799b32574497f 100644 (file)
@@ -6027,6 +6027,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