]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Simplify test for limited types
authorRonan Desplanques <desplanques@adacore.com>
Thu, 19 Feb 2026 15:45:48 +0000 (16:45 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 28 May 2026 08:52:46 +0000 (10:52 +0200)
Is_Limited_Type always returns True for types where Is_Limited_Composite
is True, therefore the disjunct this patch removes had no effect.

gcc/ada/ChangeLog:

* sem_ch3.adb (Process_Full_View): Simplify test.

gcc/ada/sem_ch3.adb

index 38c009d0fd8d06f44585a32a7c52a00925bced91..ce75692cbbe83859e72cdeb952fbc8c5c43b14bc 100644 (file)
@@ -21821,10 +21821,7 @@ package body Sem_Ch3 is
       --  decoration of the full view and thus cannot be placed with other
       --  similar checks in Find_Type_Name
 
-      if not Is_Limited_Type (Priv_T)
-        and then (Is_Limited_Type (Full_T)
-                   or else Is_Limited_Composite (Full_T))
-      then
+      if not Is_Limited_Type (Priv_T) and then Is_Limited_Type (Full_T) then
          if In_Instance then
             null;
          else