]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix regression in Root_Type -- adjustment
authorBob Duff <duff@adacore.com>
Tue, 19 Aug 2025 16:22:38 +0000 (12:22 -0400)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 11 Sep 2025 09:10:48 +0000 (11:10 +0200)
Recent changes "Fix regression in Root_Type" and
"Crash on b3a1004 with assertions enabled" are partially
redundant; they are addressing the same bug.
This patch adjusts the former in the case of Root_Type.
But we leave Root_Type_If_Set alone; debugging printouts
should survive bugs when possible.

gcc/ada/ChangeLog:

* einfo-utils.adb (Root_Type): Do not deal with missing Etype.

gcc/ada/einfo-utils.adb

index 450d4c36b2110c4d9aa43607e8a05812bce96580..290ae331d37ad15357b5853c8bdec1cbc2ebb1ef 100644 (file)
@@ -2585,11 +2585,7 @@ package body Einfo.Utils is
             loop
                Etyp := Etype (T);
 
-               if No (Etyp) then
-                  Check_Error_Detected;
-               end if;
-
-               exit when No (Etyp) or else T = Etyp
+               exit when T = Etyp
                  or else
                    (Is_Private_Type (T) and then Etyp = Full_View (T))
                  or else