aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index e7958058..b8e4d81 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -740,15 +740,16 @@ package body Sem_Util is
N : Node_Id) return Entity_Id
is
Loc : constant Source_Ptr := Sloc (N);
- Bas : Entity_Id;
- -- The base type that is to be constrained by the defaults.
-
Disc : Entity_Id;
+ Bas : Entity_Id;
+ -- The base type that is to be constrained by the defaults
+
begin
if not Has_Discriminants (T) or else Is_Constrained (T) then
return T;
end if;
+
Bas := Base_Type (T);
-- If T is non-private but its base type is private, this is
@@ -757,9 +758,7 @@ package body Sem_Util is
-- proper discriminants are to be found in the full view of
-- the base.
- if Is_Private_Type (Bas)
- and then Present (Full_View (Bas))
- then
+ if Is_Private_Type (Bas) and then Present (Full_View (Bas)) then
Bas := Full_View (Bas);
end if;