[Ada] Ignore container types for aggregates if not in Ada_2020
authorEd Schonberg <schonberg@adacore.com>
Wed, 2 Sep 2020 13:30:09 +0000 (09:30 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 23 Oct 2020 08:24:54 +0000 (04:24 -0400)
gcc/ada/

* sem_aggr.adb (Resolve_Aggregate): Do not call
Resolve_Container_Aggregate if compilation version is earlier
than Ada_2020.

gcc/ada/sem_aggr.adb

index d6d0083b2580d43adff15b27192157a43d5201bb..fdc27b30e00ecd37a46c2d62b53ea78c3cc950ad 100644 (file)
@@ -901,6 +901,7 @@ package body Sem_Aggr is
 
       elsif Present (Find_Aspect (Typ, Aspect_Aggregate))
         and then Ekind (Typ) /= E_Record_Type
+        and then Ada_Version >= Ada_2020
       then
          Resolve_Container_Aggregate (N, Typ);