gcc/ada/
* freeze.adb (Freeze_Array_Type): Remove propagation of
Has_Own_Invariants to the first subtype. This is a no-op,
because the current (incorrect) version of Has_Own_Invariants
calls Base_Type.
* sem_prag.adb, sem_util.adb: Pass the base type to
Set_Has_Own_Invariants.
and then not GNATprove_Mode
then
Set_Has_Own_Invariants (Arr);
-
- -- The array type is an implementation base type. Propagate the
- -- same property to the first subtype.
-
- if Is_Itype (Arr) then
- Set_Has_Own_Invariants (First_Subtype (Arr));
- end if;
end if;
-- Warn for pragma Pack overriding foreign convention
-- The pragma defines a type-specific invariant, the type is said
-- to have invariants of its "own".
- Set_Has_Own_Invariants (Typ);
+ Set_Has_Own_Invariants (Base_Type (Typ));
-- If the invariant is class-wide, then it can be inherited by
-- derived or interface implementing types. The type is said to
end if;
if Has_Own_Invariants (From_Typ) then
- Set_Has_Own_Invariants (Typ);
+ Set_Has_Own_Invariants (Base_Type (Typ));
end if;
if Present (Full_IP) and then No (Invariant_Procedure (Typ)) then