Commit 82701811 by Arnaud Charlet

[multiple changes]

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb, einfo.ads: Minor reformatting.

2014-08-04  Yannick Moy  <moy@adacore.com>

	* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
	detection of subprograms that cannot be inlined in GNATprove mode.

2014-08-04  Ed Schonberg  <schonberg@adacore.com>

	* einfo.adb: Add guard to Returns_Limited_View.

2014-08-04  Jose Ruiz  <ruiz@adacore.com>

	* s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
	the secondary stack to respect the alignments of the returned objects.

From-SVN: r213565
parent a4b07ff0
2014-08-04 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, einfo.ads: Minor reformatting.
2014-08-04 Yannick Moy <moy@adacore.com>
* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
detection of subprograms that cannot be inlined in GNATprove mode.
2014-08-04 Ed Schonberg <schonberg@adacore.com>
* einfo.adb: Add guard to Returns_Limited_View.
2014-08-04 Jose Ruiz <ruiz@adacore.com>
* s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
the secondary stack to respect the alignments of the returned objects.
2014-08-04 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
......
......@@ -2872,6 +2872,7 @@ package body Einfo is
function Returns_Limited_View (Id : E) return B is
begin
pragma Assert (Ekind (Id) = E_Function);
return Flag134 (Id);
end Returns_Limited_View;
......@@ -5701,6 +5702,7 @@ package body Einfo is
procedure Set_Returns_Limited_View (Id : E; V : B := True) is
begin
pragma Assert (Ekind (Id) = E_Function);
Set_Flag134 (Id, V);
end Set_Returns_Limited_View;
......
......@@ -3767,15 +3767,15 @@ package Einfo is
-- even though it causes the whole function to return.
-- Returns_By_Ref (Flag90)
-- Defined in function entities, to indicate that the function
-- returns the result by reference, either because its return type is a
-- by-reference-type or because it uses explicitly the secondary stack.
-- Defined in function entities. Set if the function returns the result
-- by reference, either because its return type is a by-reference-type
-- or because the function explicitly uses the secondary stack.
-- Returns_Limited_View (Flag134)
-- Defined on function entities, to indicate that the return type of
-- the function at the point of definition is a limited view. Used to
-- handle the late freezing of the function, when it is called in the
-- current semantic unit while it is still unfrozen.
-- Defined in function entities. Set if the return type of the function
-- at the point of definition is a limited view. Used to handle the late
-- freezing of the function when it is called in the current semantic
-- unit while it is still unfrozen.
-- Reverse_Bit_Order (Flag164) [base type only]
-- Defined in all record type entities. Set if entity has a Bit_Order
......
......@@ -1382,6 +1382,9 @@ package body Inline is
-- Returns True if subprogram Id has any contract (Pre, Post, Global,
-- Depends, etc.)
function Is_Unit_Subprogram (Id : Entity_Id) return Boolean;
-- Returns True if subprogram Id defines a compilation unit
function In_Package_Visible_Spec (Id : Node_Id) return Boolean;
-- Returns True if subprogram Id is defined in the visible part of a
-- package specification.
......@@ -1436,6 +1439,20 @@ package body Inline is
return Nkind (Original_Node (Decl)) = N_Expression_Function;
end Is_Expression_Function;
------------------------
-- Is_Unit_Subprogram --
------------------------
function Is_Unit_Subprogram (Id : Entity_Id) return Boolean is
Decl : Node_Id := Parent (Parent (Id));
begin
if Nkind (Parent (Id)) = N_Defining_Program_Unit_Name then
Decl := Parent (Decl);
end if;
return Nkind (Parent (Decl)) = N_Compilation_Unit;
end Is_Unit_Subprogram;
-- Local declarations
Id : Entity_Id; -- Procedure or function entity for the subprogram
......@@ -1462,7 +1479,7 @@ package body Inline is
-- Do not inline unit-level subprograms
if Nkind (Parent (Id)) = N_Defining_Program_Unit_Name then
if Is_Unit_Subprogram (Id) then
return False;
-- Do not inline subprograms declared in the visible part of a package
......
......@@ -210,6 +210,7 @@ package body System.Tasking.Restricted.Stages is
Secondary_Stack : aliased SSE.Storage_Array
(1 .. Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size *
SSE.Storage_Offset (Parameters.Sec_Stack_Percentage) / 100);
for Secondary_Stack'Alignment use Standard'Maximum_Alignment;
pragma Warnings (Off);
Secondary_Stack_Address : System.Address := Secondary_Stack'Address;
......
......@@ -1052,6 +1052,7 @@ package body System.Tasking.Stages is
SSE.Storage_Offset (Parameters.Sec_Stack_Percentage) / 100;
Secondary_Stack : aliased SSE.Storage_Array (1 .. Secondary_Stack_Size);
for Secondary_Stack'Alignment use Standard'Maximum_Alignment;
-- Actual area allocated for secondary stack
Secondary_Stack_Address : System.Address := Secondary_Stack'Address;
......
......@@ -6909,6 +6909,7 @@ package body Sem_Ch3 is
-- and the full derivation can only be its underlying full view.
Build_Full_Derivation;
if not Is_Completion then
Set_Full_View (Derived_Type, Full_Der);
else
......
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