From: Eric Botcazou <[email protected]>

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.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_ch12.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index a5df3e535fa..d3403074ce4 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -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
-- 
2.51.0

Reply via email to