[Ada] Remove inappropriate test from Is_By_Reference_Type
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 21 Jun 2021 14:13:25 +0000 (16:13 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 20 Sep 2021 12:31:27 +0000 (12:31 +0000)
gcc/ada/

* sem_aux.adb (Is_By_Reference_Type): Do not test Error_Posted.

gcc/ada/sem_aux.adb

index ea3b59c..bce7c38 100644 (file)
@@ -846,10 +846,7 @@ package body Sem_Aux is
       Btype : constant Entity_Id := Base_Type (Ent);
 
    begin
-      if Error_Posted (Ent) or else Error_Posted (Btype) then
-         return False;
-
-      elsif Is_Private_Type (Btype) then
+      if Is_Private_Type (Btype) then
          declare
             Utyp : constant Entity_Id := Underlying_Type (Btype);
          begin