OSDN Git Service

libitm: Remove unused code.
[pf3gnuchains/gcc-fork.git] / gcc / ada / sem_aux.adb
index 0e5c3db..3b3453f 100755 (executable)
@@ -216,16 +216,12 @@ package body Sem_Aux is
 
       --  The discriminants are not necessarily contiguous, because access
       --  discriminants will generate itypes. They are not the first entities
-      --  either, because tag and controller record must be ahead of them.
+      --  either because the tag must be ahead of them.
 
       if Chars (Ent) = Name_uTag then
          Ent := Next_Entity (Ent);
       end if;
 
-      if Chars (Ent) = Name_uController then
-         Ent := Next_Entity (Ent);
-      end if;
-
       --  Skip all hidden stored discriminants if any
 
       while Present (Ent) loop
@@ -289,17 +285,11 @@ package body Sem_Aux is
          Ent := Next_Entity (Ent);
       end if;
 
-      if Chars (Ent) = Name_uController then
-         Ent := Next_Entity (Ent);
-      end if;
-
       if Has_Completely_Hidden_Discriminant (Ent) then
-
          while Present (Ent) loop
             exit when Is_Completely_Hidden (Ent);
             Ent := Next_Entity (Ent);
          end loop;
-
       end if;
 
       pragma Assert (Ekind (Ent) = E_Discriminant);
@@ -455,9 +445,7 @@ package body Sem_Aux is
       Btype : constant Entity_Id := Base_Type (Ent);
 
    begin
-      if Error_Posted (Ent)
-        or else Error_Posted (Btype)
-      then
+      if Error_Posted (Ent) or else Error_Posted (Btype) then
          return False;
 
       elsif Is_Private_Type (Btype) then
@@ -609,7 +597,7 @@ package body Sem_Aux is
    -------------------------------
 
    function Is_Immutably_Limited_Type (Ent : Entity_Id) return Boolean is
-      Btype : constant Entity_Id := Base_Type (Ent);
+      Btype : constant Entity_Id := Available_View (Base_Type (Ent));
 
    begin
       if Is_Limited_Record (Btype) then
@@ -619,9 +607,8 @@ package body Sem_Aux is
         and then Nkind (Parent (Btype)) = N_Formal_Type_Declaration
       then
          return not In_Package_Body (Scope ((Btype)));
-      end if;
 
-      if Is_Private_Type (Btype) then
+      elsif Is_Private_Type (Btype) then
 
          --  AI05-0063: A type derived from a limited private formal type is
          --  not immutably limited in a generic body.