Commit 760804f3 by Arnaud Charlet

[multiple changes]

2015-01-30  Yannick Moy  <moy@adacore.com>

	* sem_attr.adb: Code clean up.

2015-01-30  Robert Dewar  <dewar@adacore.com>

	* ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
	* ali.ads (Unit_Record): Add new field Serious_Errors.
	* lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
	attribute in U line.
	* lib-writ.ads: New attribute SE (serious erors) in unit line.

2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb Update the usage of attributes Entry_Bodies_Array,
	Lit_Indexes, Scale_Value, Storage_Size_Variable,
	String_Literal_Low_Bound along associated routines and
	Write_FieldX_Name.
	(Pending_Access_Types): New routine.
	(Set_Pending_Access_Types): New routine.
	(Write_Field15_Name): Add an entry for Pending_Access_Types.
	* einfo.ads Add new attribute Pending_Access_Types along
	with usage in nodes.  Update the usage of attributes
	Entry_Bodies_Array, Lit_Indexes, Scale_Value,
	Storage_Size_Variable, String_Literal_Low_Bound.
	(Pending_Access_Types): New routine along with pragma Inline.
	(Set_Pending_Access_Types): New routine along with pragma Inline.
	* exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
	Ins_Node. Determine the insertion node for anonynous access type
	that acts as a component type of an array. Update the call to
	Build_Finalization_Master.
	(Expand_Freeze_Record_Type): Update
	the calls to Build_Finalization_Master.
	(Freeze_Type): Remove
	local variable RACW_Seen. Factor out the code that deals with
	remote access-to-class-wide types. Create a finalization master
	when the designated type contains a private component. Fully
	initialize all pending access types.
	(Process_RACW_Types): New routine.
	(Process_Pending_Access_Types): New routine.
	* exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
	needs to set primitive Finalize_Address.
	(Expand_N_Allocator): Allocation no longer sets primitive
	Finalize_Address.
	* exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
	Update the call to Build_Finalization_Master.
	(Make_Build_In_Place_Call_In_Allocator): Allocation no longer
	needs to set primitive Finalize_Address.
	* exp_ch7.adb (Add_Pending_Access_Type): New routine.
	(Build_Finalization_Master): New parameter profile. Associate
	primitive Finalize_Address with the finalization master if the
	designated type has been frozen, otherwise treat the access
	type as pending. Simplify the insertion of the master and
	related initialization code.
	(Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
	abstract types.
	(Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
	Simplify the implementation.
	* exp_ch7.ads (Build_Finalization_Master): New parameter profile
	along with comment on usage.
	(Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
	the comment on usage.
	* exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
	Finalize_Address to retrieve the primitive.
	(Finalize_Address): New routine.
	(Find_Finalize_Address): Removed.
	* exp_util.ads (Finalize_Address): New routine.
	* freeze.adb (Freeze_All): Remove the generation of finalization
	masters.
	* sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
	pending access types from the partial to the full view.

From-SVN: r220279
parent 3b506eef
2015-01-30 Yannick Moy <moy@adacore.com>
* sem_attr.adb: Code clean up.
2015-01-30 Robert Dewar <dewar@adacore.com>
* ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
* ali.ads (Unit_Record): Add new field Serious_Errors.
* lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
attribute in U line.
* lib-writ.ads: New attribute SE (serious erors) in unit line.
2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb Update the usage of attributes Entry_Bodies_Array,
Lit_Indexes, Scale_Value, Storage_Size_Variable,
String_Literal_Low_Bound along associated routines and
Write_FieldX_Name.
(Pending_Access_Types): New routine.
(Set_Pending_Access_Types): New routine.
(Write_Field15_Name): Add an entry for Pending_Access_Types.
* einfo.ads Add new attribute Pending_Access_Types along
with usage in nodes. Update the usage of attributes
Entry_Bodies_Array, Lit_Indexes, Scale_Value,
Storage_Size_Variable, String_Literal_Low_Bound.
(Pending_Access_Types): New routine along with pragma Inline.
(Set_Pending_Access_Types): New routine along with pragma Inline.
* exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
Ins_Node. Determine the insertion node for anonynous access type
that acts as a component type of an array. Update the call to
Build_Finalization_Master.
(Expand_Freeze_Record_Type): Update
the calls to Build_Finalization_Master.
(Freeze_Type): Remove
local variable RACW_Seen. Factor out the code that deals with
remote access-to-class-wide types. Create a finalization master
when the designated type contains a private component. Fully
initialize all pending access types.
(Process_RACW_Types): New routine.
(Process_Pending_Access_Types): New routine.
* exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
needs to set primitive Finalize_Address.
(Expand_N_Allocator): Allocation no longer sets primitive
Finalize_Address.
* exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
Update the call to Build_Finalization_Master.
(Make_Build_In_Place_Call_In_Allocator): Allocation no longer
needs to set primitive Finalize_Address.
* exp_ch7.adb (Add_Pending_Access_Type): New routine.
(Build_Finalization_Master): New parameter profile. Associate
primitive Finalize_Address with the finalization master if the
designated type has been frozen, otherwise treat the access
type as pending. Simplify the insertion of the master and
related initialization code.
(Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
abstract types.
(Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
Simplify the implementation.
* exp_ch7.ads (Build_Finalization_Master): New parameter profile
along with comment on usage.
(Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
the comment on usage.
* exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
Finalize_Address to retrieve the primitive.
(Finalize_Address): New routine.
(Find_Finalize_Address): Removed.
* exp_util.ads (Finalize_Address): New routine.
* freeze.adb (Freeze_All): Remove the generation of finalization
masters.
* sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
pending access types from the partial to the full view.
2015-01-30 Robert Dewar <dewar@adacore.com>
* sem_disp.adb: Minor reformatting.
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -1704,6 +1704,7 @@ package body ALI is
UL.Shared_Passive := False;
UL.RCI := False;
UL.Remote_Types := False;
UL.Serious_Errors := False;
UL.Has_RACW := False;
UL.Init_Scalars := False;
UL.Is_Generic := False;
......@@ -1956,10 +1957,14 @@ package body ALI is
Check_At_End_Of_Field;
-- SE/SP/SU parameters
elsif C = 'S' then
C := Getc;
if C = 'P' then
if C = 'E' then
Units.Table (Units.Last).Serious_Errors := True;
elsif C = 'P' then
Units.Table (Units.Last).Shared_Passive := True;
elsif C = 'U' then
Units.Table (Units.Last).Unit_Kind := 's';
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -302,6 +302,10 @@ package ALI is
-- Indicates presence of RT parameter for a package which has a
-- pragma Remote_Types.
Serious_Errors : Boolean;
-- Indicates presence of SE parameter indicating that compilation of
-- the unit encountered as serious error.
Shared_Passive : Boolean;
-- Indicates presence of SP parameter for a package which has a pragma
-- Shared_Passive.
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -1278,30 +1278,6 @@ package body Exp_Ch4 is
Prefix => New_Occurrence_Of (Temp, Loc))),
Typ => T));
end if;
-- Generate:
-- Set_Finalize_Address (<PtrT>FM, <T>FD'Unrestricted_Access);
-- Do not generate this call in the following cases:
-- * .NET/JVM - these targets do not support address arithmetic
-- and unchecked conversion, key elements of Finalize_Address.
-- * CodePeer mode - TSS primitive Finalize_Address is not
-- created in this mode.
if VM_Target = No_VM
and then not CodePeer_Mode
and then Present (Finalization_Master (PtrT))
and then Present (Temp_Decl)
and then Nkind (Expression (Temp_Decl)) = N_Allocator
then
Insert_Action (N,
Make_Set_Finalize_Address_Call
(Loc => Loc,
Typ => T,
Ptr_Typ => PtrT));
end if;
end if;
Rewrite (N, New_Occurrence_Of (Temp, Loc));
......@@ -4868,40 +4844,22 @@ package body Exp_Ch4 is
(Obj_Ref => New_Copy_Tree (Init_Arg1),
Typ => T));
if Present (Finalization_Master (PtrT)) then
-- Special processing for .NET/JVM, the allocated object
-- is attached to the finalization master. Generate:
-- Attach (<PtrT>FM, Root_Controlled_Ptr (Init_Arg1));
-- Special processing for .NET/JVM, the allocated object is
-- attached to the finalization master. Generate:
-- Types derived from [Limited_]Controlled are the only
-- ones considered since they have fields Prev and Next.
if VM_Target /= No_VM then
if Is_Controlled (T) then
Insert_Action (N,
Make_Attach_Call
(Obj_Ref => New_Copy_Tree (Init_Arg1),
Ptr_Typ => PtrT));
end if;
-- Attach (<PtrT>FM, Root_Controlled_Ptr (Init_Arg1));
-- Default case, generate:
-- Types derived from [Limited_]Controlled are the only ones
-- considered since they have fields Prev and Next.
-- Set_Finalize_Address
-- (<PtrT>FM, <T>FD'Unrestricted_Access);
-- Do not generate this call in CodePeer mode, as TSS
-- primitive Finalize_Address is not created in this
-- mode.
elsif not CodePeer_Mode then
Insert_Action (N,
Make_Set_Finalize_Address_Call
(Loc => Loc,
Typ => T,
Ptr_Typ => PtrT));
end if;
if VM_Target /= No_VM
and then Is_Controlled (T)
and then Present (Finalization_Master (PtrT))
then
Insert_Action (N,
Make_Attach_Call
(Obj_Ref => New_Copy_Tree (Init_Arg1),
Ptr_Typ => PtrT));
end if;
end if;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -415,9 +415,10 @@ package body Exp_Ch6 is
and then No (Finalization_Master (Ptr_Typ))
then
Build_Finalization_Master
(Typ => Ptr_Typ,
Ins_Node => Associated_Node_For_Itype (Ptr_Typ),
Encl_Scope => Scope (Ptr_Typ));
(Typ => Ptr_Typ,
For_Anonymous => True,
Context_Scope => Scope (Ptr_Typ),
Insertion_Node => Associated_Node_For_Itype (Ptr_Typ));
end if;
-- Access-to-controlled types should always have a master
......@@ -8357,33 +8358,6 @@ package body Exp_Ch6 is
Add_Access_Actual_To_Build_In_Place_Call
(Func_Call, Function_Id, Return_Obj_Actual);
-- If the build-in-place function call returns a controlled object,
-- the finalization master will require a reference to routine
-- Finalize_Address of the designated type. Setting this attribute
-- is done in the same manner to expansion of allocators.
if Needs_Finalization (Result_Subt) then
-- Controlled types with supressed finalization do not need to
-- associate the address of their Finalize_Address primitives with
-- a master since they do not need a master to begin with.
if Is_Library_Level_Entity (Acc_Type)
and then Finalize_Storage_Only (Result_Subt)
then
null;
-- Do not generate the call to Set_Finalize_Address in CodePeer mode
-- because Finalize_Address is never built.
elsif not CodePeer_Mode then
Insert_Action (Allocator,
Make_Set_Finalize_Address_Call (Loc,
Typ => Etype (Function_Id),
Ptr_Typ => Acc_Type));
end if;
end if;
-- Finally, replace the allocator node with a reference to the temp
Rewrite (Allocator, New_Occurrence_Of (Return_Obj_Access, Loc));
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -98,17 +98,20 @@ package Exp_Ch7 is
-- exception will be saved to a global location.
procedure Build_Finalization_Master
(Typ : Entity_Id;
Ins_Node : Node_Id := Empty;
Encl_Scope : Entity_Id := Empty);
(Typ : Entity_Id;
For_Anonymous : Boolean := False;
For_Private : Boolean := False;
Context_Scope : Entity_Id := Empty;
Insertion_Node : Node_Id := Empty);
-- Build a finalization master for an access type. The designated type may
-- not necessarely be controlled or need finalization actions. The routine
-- creates a wrapper around a user-defined storage pool or the general
-- storage pool for access types. Ins_Nod and Encl_Scope are used in
-- conjunction with anonymous access types. Ins_Node designates the
-- insertion point before which the collection should be added. Encl_Scope
-- is the scope of the context, either the enclosing record or the scope
-- of the related function.
-- not necessarely be controlled or need finalization actions depending on
-- the context. Flag For_Anonymous must be set when creating a master for
-- an anonymous access type. Flag For_Private must be set when the
-- designated type contains a private component. Parameters Context_Scope
-- and Insertion_Node must be used in conjunction with flags For_Anonymous
-- and For_Private. Context_Scope is the scope of the context where the
-- finalization master must be analyzed. Insertion_Node is the insertion
-- point before which the master is inserted.
procedure Build_Late_Proc (Typ : Entity_Id; Nam : Name_Id);
-- Build one controlling procedure when a late body overrides one of
......@@ -222,15 +225,13 @@ package Exp_Ch7 is
function Make_Set_Finalize_Address_Call
(Loc : Source_Ptr;
Typ : Entity_Id;
Ptr_Typ : Entity_Id) return Node_Id;
-- Associate the Finalize_Address primitive of the designated type with the
-- finalization master of access type Ptr_Typ. The returned call is:
-- Generate the following call:
--
-- Set_Finalize_Address (<Ptr_Typ>FM, <Typ>FD'Unrestricted_Access);
--
-- where Finalize_Address is the corresponding TSS primitive of type Typ
-- and Ptr_Typ is the access type of the related allocation. Loc is the
-- source location of the related allocator.
-- Set_Finalize_Address
-- (<Ptr_Typ>FM, <Desig_Typ>FD'Unrestricted_Access);
--------------------------------------------
-- Task and Protected Object finalization --
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -412,9 +412,6 @@ package body Exp_Util is
Proc_To_Call : Node_Id := Empty;
Ptr_Typ : Entity_Id;
function Find_Finalize_Address (Typ : Entity_Id) return Entity_Id;
-- Locate TSS primitive Finalize_Address in type Typ
function Find_Object (E : Node_Id) return Node_Id;
-- Given an arbitrary expression of an allocator, try to find an object
-- reference in it, otherwise return the original expression.
......@@ -423,82 +420,6 @@ package body Exp_Util is
-- Determine whether subprogram Subp denotes a custom allocate or
-- deallocate.
---------------------------
-- Find_Finalize_Address --
---------------------------
function Find_Finalize_Address (Typ : Entity_Id) return Entity_Id is
Utyp : Entity_Id := Typ;
begin
-- Handle protected class-wide or task class-wide types
if Is_Class_Wide_Type (Utyp) then
if Is_Concurrent_Type (Root_Type (Utyp)) then
Utyp := Root_Type (Utyp);
elsif Is_Private_Type (Root_Type (Utyp))
and then Present (Full_View (Root_Type (Utyp)))
and then Is_Concurrent_Type (Full_View (Root_Type (Utyp)))
then
Utyp := Full_View (Root_Type (Utyp));
end if;
end if;
-- Handle private types
if Is_Private_Type (Utyp) and then Present (Full_View (Utyp)) then
Utyp := Full_View (Utyp);
end if;
-- Handle protected and task types
if Is_Concurrent_Type (Utyp)
and then Present (Corresponding_Record_Type (Utyp))
then
Utyp := Corresponding_Record_Type (Utyp);
end if;
Utyp := Underlying_Type (Base_Type (Utyp));
-- Deal with untagged derivation of private views. If the parent is
-- now known to be protected, the finalization routine is the one
-- defined on the corresponding record of the ancestor (corresponding
-- records do not automatically inherit operations, but maybe they
-- should???)
if Is_Untagged_Derivation (Typ) then
if Is_Protected_Type (Typ) then
Utyp := Corresponding_Record_Type (Root_Type (Base_Type (Typ)));
else
Utyp := Underlying_Type (Root_Type (Base_Type (Typ)));
if Is_Protected_Type (Utyp) then
Utyp := Corresponding_Record_Type (Utyp);
end if;
end if;
end if;
-- If the underlying_type is a subtype, we are dealing with the
-- completion of a private type. We need to access the base type and
-- generate a conversion to it.
if Utyp /= Base_Type (Utyp) then
pragma Assert (Is_Private_Type (Typ));
Utyp := Base_Type (Utyp);
end if;
-- When dealing with an internally built full view for a type with
-- unknown discriminants, use the original record type.
if Is_Underlying_Record_View (Utyp) then
Utyp := Etype (Utyp);
end if;
return TSS (Utyp, TSS_Finalize_Address);
end Find_Finalize_Address;
-----------------
-- Find_Object --
-----------------
......@@ -764,7 +685,7 @@ package body Exp_Util is
-- since it contains an Unchecked_Conversion.
if Needs_Finalization (Desig_Typ) and then not CodePeer_Mode then
Fin_Addr_Id := Find_Finalize_Address (Desig_Typ);
Fin_Addr_Id := Finalize_Address (Desig_Typ);
pragma Assert (Present (Fin_Addr_Id));
Append_To (Actuals,
......@@ -2443,6 +2364,82 @@ package body Exp_Util is
end if;
end Expand_Subtype_From_Expr;
----------------------
-- Finalize_Address --
----------------------
function Finalize_Address (Typ : Entity_Id) return Entity_Id is
Utyp : Entity_Id := Typ;
begin
-- Handle protected class-wide or task class-wide types
if Is_Class_Wide_Type (Utyp) then
if Is_Concurrent_Type (Root_Type (Utyp)) then
Utyp := Root_Type (Utyp);
elsif Is_Private_Type (Root_Type (Utyp))
and then Present (Full_View (Root_Type (Utyp)))
and then Is_Concurrent_Type (Full_View (Root_Type (Utyp)))
then
Utyp := Full_View (Root_Type (Utyp));
end if;
end if;
-- Handle private types
if Is_Private_Type (Utyp) and then Present (Full_View (Utyp)) then
Utyp := Full_View (Utyp);
end if;
-- Handle protected and task types
if Is_Concurrent_Type (Utyp)
and then Present (Corresponding_Record_Type (Utyp))
then
Utyp := Corresponding_Record_Type (Utyp);
end if;
Utyp := Underlying_Type (Base_Type (Utyp));
-- Deal with untagged derivation of private views. If the parent is
-- now known to be protected, the finalization routine is the one
-- defined on the corresponding record of the ancestor (corresponding
-- records do not automatically inherit operations, but maybe they
-- should???)
if Is_Untagged_Derivation (Typ) then
if Is_Protected_Type (Typ) then
Utyp := Corresponding_Record_Type (Root_Type (Base_Type (Typ)));
else
Utyp := Underlying_Type (Root_Type (Base_Type (Typ)));
if Is_Protected_Type (Utyp) then
Utyp := Corresponding_Record_Type (Utyp);
end if;
end if;
end if;
-- If the underlying_type is a subtype, we are dealing with the
-- completion of a private type. We need to access the base type and
-- generate a conversion to it.
if Utyp /= Base_Type (Utyp) then
pragma Assert (Is_Private_Type (Typ));
Utyp := Base_Type (Utyp);
end if;
-- When dealing with an internally built full view for a type with
-- unknown discriminants, use the original record type.
if Is_Underlying_Record_View (Utyp) then
Utyp := Etype (Utyp);
end if;
return TSS (Utyp, TSS_Finalize_Address);
end Finalize_Address;
------------------------
-- Find_Interface_ADT --
------------------------
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -450,6 +450,9 @@ package Exp_Util is
-- declarations and/or allocations when the type is indefinite (including
-- class-wide).
function Finalize_Address (Typ : Entity_Id) return Entity_Id;
-- Locate TSS primitive Finalize_Address in type Typ
function Find_Interface_ADT
(T : Entity_Id;
Iface : Entity_Id) return Elmt_Id;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -1796,25 +1796,6 @@ package body Freeze is
Next_Entity (Ent);
end loop;
end;
-- We add finalization masters to access types whose designated types
-- require finalization. This is normally done when freezing the
-- type, but this misses recursive type definitions where the later
-- members of the recursion introduce controlled components (such as
-- can happen when incomplete types are involved), as well cases
-- where a component type is private and the controlled full type
-- occurs after the access type is frozen. Cases that don't need a
-- finalization master are generic formal types (the actual type will
-- have it) and types derived from them, and types with Java and CIL
-- conventions, since those are used for API bindings.
-- (Are there any other cases that should be excluded here???)
elsif Is_Access_Type (E)
and then Comes_From_Source (E)
and then not Is_Generic_Type (Root_Type (E))
and then Needs_Finalization (Designated_Type (E))
then
Build_Finalization_Master (E);
end if;
Next_Entity (E);
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -499,6 +499,10 @@ package body Lib.Writ is
Write_Info_Str (" RT");
end if;
if Serious_Errors_Detected /= 0 then
Write_Info_Str (" SE");
end if;
if Is_Shared_Passive (Uent) then
Write_Info_Str (" SP");
end if;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -598,11 +598,15 @@ package Lib.Writ is
-- RT Unit has pragma Remote_Types
-- SP Unit has pragma Shared_Passive.
-- SE Compilation of unit encountered one or more serious errors.
-- Normally the generation of an ALI file is suppressed if there
-- is a serious error, but this can be overridden with -gnatQ.
-- SP Unit has pragma Shared_Passive
-- SU Unit is a subprogram, rather than a package
-- The attributes may appear in any order, separated by spaces.
-- The attributes may appear in any order, separated by spaces
-- -----------------------------
-- -- W, Y and Z Withed Units --
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -4595,7 +4595,8 @@ package body Sem_Attr is
-- corresponding pragma. Don't issue errors when analyzing aspect.
if Nkind (Prag) = N_Aspect_Specification
and then Chars (Identifier (Prag)) = Name_Post
and then Nam_In (Chars (Identifier (Prag)), Name_Post,
Name_Refined_Post)
then
null;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -2792,6 +2792,14 @@ package body Sem_Ch3 is
Generate_Definition (Def_Id);
end if;
-- Propagate any pending access types whose finalization masters need to
-- be fully initialized from the partial to the full view. Guard against
-- an illegal full view that remains unanalyzed.
if Is_Type (Def_Id) and then Is_Incomplete_Or_Private_Type (Prev) then
Set_Pending_Access_Types (Def_Id, Pending_Access_Types (Prev));
end if;
if Chars (Scope (Def_Id)) = Name_System
and then Chars (Def_Id) = Name_Address
and then Is_Predefined_File_Name (Unit_File_Name (Get_Source_Unit (N)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment