]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix recursive call in Process_Subtype
authorRonan Desplanques <desplanques@adacore.com>
Tue, 18 Mar 2025 07:53:35 +0000 (08:53 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 10 Jun 2025 07:32:03 +0000 (09:32 +0200)
Process_Subtype calls itself in some error situations. This recursive
call was not updated together with the recent addition of the
Excludes_Null formal. This does not matter in practice because there can
never be both a null exclusion and another constraint at the same time,
but this patch updates the call anyway to make the situation clearer.

gcc/ada/ChangeLog:

* sem_ch3.adb (Process_Subtype): Fix recursive call.

gcc/ada/sem_ch3.adb

index fcf2baa9d3e083f48d979bea5dc9f3864cc5a6dc..fdf225efc30ad40dbdde75dcf265395446edb9ec 100644 (file)
@@ -22705,7 +22705,9 @@ package body Sem_Ch3 is
 
             --  Make recursive call, having got rid of the bogus constraint
 
-            return Process_Subtype (S, Related_Nod, Related_Id, Suffix);
+            return
+              Process_Subtype
+                (S, Related_Nod, Related_Id, Suffix, Excludes_Null);
          end if;
 
          --  Remaining processing depends on type. Select on Base_Type kind to