]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix error on Designated_Storage_Model with extensions disabled
authorRonan Desplanques <desplanques@adacore.com>
Tue, 17 Jun 2025 08:13:20 +0000 (10:13 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 4 Jul 2025 07:41:46 +0000 (09:41 +0200)
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.

gcc/ada/sem_ch13.adb

index 1e88ef4b48dbc5ee9869cb5f45ed3893a4c5d9ed..d080e307542cefe1962e1f9e712db5fa53fd3c42 100644 (file)
@@ -4634,6 +4634,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;