diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8b3f99f2797..4a6f2775303 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2015-05-22 Ed Schonberg + + * 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 + + * 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 * sem_res.adb (Resolve_Actuals): If the call is to an overridden diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 5d876551f1e..fcb37fa54b6 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -2085,11 +2085,11 @@ package Einfo is -- 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 @@ -2207,7 +2207,7 @@ package Einfo is -- 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. @@ -3187,7 +3187,7 @@ package Einfo is -- 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. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 0ef690b0f93..7bd3c6be157 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -7523,9 +7523,9 @@ package body Exp_Ch4 is 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 diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 586289dab7d..64367614ede 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -944,7 +944,7 @@ package body Freeze is -- 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) @@ -1037,7 +1037,7 @@ package body Freeze is (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) diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index c44941667ba..0c7a7777868 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -2928,7 +2928,7 @@ package body Layout is 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; diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index f38ff5fa7c1..b5c8888bb6a 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -833,7 +833,7 @@ package body Sem_Ch12 is -- -- 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 diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 30c35c20a98..f0abad3a950 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -12901,6 +12901,13 @@ package body Sem_Ch3 is 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); diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index fba28c362ce..d92e5baceb9 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -6521,7 +6521,7 @@ package body Sem_Ch6 is 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) diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index bb537edf4cb..cf74bf75dbc 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1170,7 +1170,7 @@ package Sem_Util is 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