https://gcc.gnu.org/g:216fc3b3bbad48b38e1c931318e91b25af1b542e

commit r15-9922-g216fc3b3bbad48b38e1c931318e91b25af1b542e
Author: Ronan Desplanques <desplanq...@adacore.com>
Date:   Tue Jun 17 10:13:20 2025 +0200

    ada: Fix error on Designated_Storage_Model with extensions disabled
    
    The format string used for the error in that case requires setting the
    Error_Msg_Name_1 global variable. This was not done so this patch adds
    the missing assignment.
    
    gcc/ada/ChangeLog:
    
            * sem_ch13.adb (Analyze_Aspect_Specifications): Fix error emission.

Diff:
---
 gcc/ada/sem_ch13.adb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 072ec66a8f3d..99d642d65ee9 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -4279,6 +4279,7 @@ package body Sem_Ch13 is
 
                when Aspect_Designated_Storage_Model =>
                   if not All_Extensions_Allowed then
+                     Error_Msg_Name_1 := Nam;
                      Error_Msg_GNAT_Extension ("aspect %", Loc);
                      goto Continue;

Reply via email to