+2015-05-22 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Constrain_Concurrent): If the context is a
+ type declaration, generate an Itype_Reference for the anonymous
+ subtype, to force elaboration at this point in gigi.
+
+2015-05-22 Gary Dismukes <dismukes@adacore.com>
+
+ * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
+ exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
+
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Actuals): If the call is to an overridden
-- to multiple subprogram entities).
-- Incomplete_Actuals (Elist24)
--- Defined on package entities that are instances. Indicates the actusl
--- types in the instantiation that are limited views. IF this list is
+-- Defined on package entities that are instances. Indicates the actuals
+-- types in the instantiation that are limited views. If this list is
-- not empty, the instantiation, which appears in a package declaration,
-- is relocated to the corresponding package body, which must have a
--- corresponding non-limited with_clause.
+-- corresponding nonlimited with_clause.
-- In_Package_Body (Flag48)
-- Defined in package entities. Set on the entity that denotes the
-- keyword. For Ada 2012, also applies to formal parameters.
-- Is_Atomic (Flag85)
--- Defined in all type entities, and also in constants, components and
+-- Defined in all type entities, and also in constants, components, and
-- variables. Set if a pragma Atomic or Shared applies to the entity.
-- In the case of private and incomplete types, this flag is set in
-- both the partial view and the full view.
-- rather than testing this flag.
-- Is_Volatile_Full_Access (Flag285)
--- Defined in all type entities, and also in constants, components and
+-- Defined in all type entities, and also in constants, components, and
-- variables. Set if a pragma Volatile_Full_Access applies to the entity.
-- In the case of private and incomplete types, this flag is set in
-- both the partial view and the full view.
Optimize_Length_Comparison (N);
- -- One more special case, if we have a comparison of X'Result = expr
+ -- One more special case: if we have a comparison of X'Result = expr
-- in floating-point, then if not already there, change expr to be
- -- f'Machine (expr) to eliminate suprise from extra precision.
+ -- f'Machine (expr) to eliminate surprise from extra precision.
if Is_Floating_Point_Type (Typl)
and then Nkind (Original_Node (Lhs)) = N_Attribute_Reference
-- We do not know the packed size for an atomic/VFA type
-- or component, or an independent type or component, or a
- -- by reference type or aliased component (because packing
+ -- by-reference type or aliased component (because packing
-- does not touch these).
if Is_Atomic_Or_VFA (Ctyp)
(Packed_Array_Impl_Type (Ctyp)))
then
-- Packed size unknown if we have an atomic/VFA type
- -- or a by reference type, since the back end knows
+ -- or a by-reference type, since the back end knows
-- how these are layed out.
if Is_Atomic_Or_VFA (Ctyp)
return;
end if;
- -- No effect if any component is atomic/VFA or is a by reference type
+ -- No effect if any component is atomic/VFA or is a by-reference type
declare
Ent : Entity_Id;
--
-- If Inst is present, it is the entity of the package instance. This
-- entity is marked as having a limited_view actual when some actual is
- -- a limited view. This is used to place the instance body properly..
+ -- a limited view. This is used to place the instance body properly.
procedure Remove_Parent (In_Body : Boolean := False);
-- Reverse effect after instantiation of child is complete
if No (Def_Id) then
Def_Id := Create_Itype (E_Void, Related_Nod, Related_Id, Suffix);
+
+ -- Elaborate itype now, as it may be used in a subsequent
+ -- synchronized operation in another scope.
+
+ if Nkind (Related_Nod) = N_Full_Type_Declaration then
+ Build_Itype_Reference (Def_Id, Related_Nod);
+ end if;
end if;
Constrain_Discriminated_Type (Def_Id, SI, Related_Nod);
return Ctype <= Mode_Conformant
or else Subtypes_Statically_Match (Type_1, Full_View (Type_2));
- -- In Ada2012, incomplete types (including limited views) can appear
+ -- In Ada 2012, incomplete types (including limited views) can appear
-- as actuals in instantiations.
elsif Is_Incomplete_Type (Type_1)
function Is_Atomic_Or_VFA_Object (N : Node_Id) return Boolean;
-- Determines if the given node is an atomic object (Is_Atomic_Object true)
- -- or else is an object for which VFA is present.
+ -- or else is an object for which VFA is present.
function Is_Attribute_Result (N : Node_Id) return Boolean;
-- Determine whether node N denotes attribute 'Result