]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix problematic aggregate with box notation
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 20 Nov 2025 20:54:03 +0000 (21:54 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 5 Dec 2025 12:22:53 +0000 (13:22 +0100)
It runs afoul of the pragma Initialize_Scalars + -gnatVa combination.

gcc/ada/ChangeLog:

* sem_ch12.adb (Remove_Parent): Only set the Is_Transient component
of the local scope stack entry.

gcc/ada/sem_ch12.adb

index a5df3e535fa47fbf3f0a1771bf2fb70a5b553a3c..d3403074ce47af0b6065da38539a5287b941f0e4 100644 (file)
@@ -16929,7 +16929,7 @@ package body Sem_Ch12 is
             Scope_Stack.Decrement_Last;
             S := Current_Scope;
          else
-            SE := (Is_Transient => False, others => <>);
+            SE.Is_Transient := False;
          end if;
 
          --  After child instantiation is complete, remove from scope stack the