Commit 13230c68 by Arnaud Charlet

[multiple changes]

2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>

	* checks.adb: Minor fix in comment.

2017-01-23  Philippe Gil  <gil@adacore.com>

	* g-debpoo.adb (Do_Report) remove freed chunks from chunks
	count in Sort = Memory_Usage or Allocations_Count

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* sem_ch3.adb: Code cleanup.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
	variables to the local variable section. Update the profile
	of various nested routine that previously had visibility
	of those globals. One the matching phase has completed,
	remove certain classes of clauses which are considered noise.
	(Check_Dependency_Clause): Properly detect a match between two
	'Result attributes. Update the various post-match cases to use
	Is_Already_Matched as this routine now automatically recognizes
	a previously matched 'Result attribute.
	(Is_Already_Matched): New routine.
	(Remove_Extra_Clauses): New routine.
	(Report_Extra_Clauses): Remove the detection of ... => null
	clauses as this is now done in Remove_Extra_Clauses.

From-SVN: r244782
parent 0d1e3cc9
2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
* checks.adb: Minor fix in comment.
2017-01-23 Philippe Gil <gil@adacore.com>
* g-debpoo.adb (Do_Report) remove freed chunks from chunks
count in Sort = Memory_Usage or Allocations_Count
2017-01-23 Justin Squirek <squirek@adacore.com>
* sem_ch3.adb: Code cleanup.
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
variables to the local variable section. Update the profile
of various nested routine that previously had visibility
of those globals. One the matching phase has completed,
remove certain classes of clauses which are considered noise.
(Check_Dependency_Clause): Properly detect a match between two
'Result attributes. Update the various post-match cases to use
Is_Already_Matched as this routine now automatically recognizes
a previously matched 'Result attribute.
(Is_Already_Matched): New routine.
(Remove_Extra_Clauses): New routine.
(Report_Extra_Clauses): Remove the detection of ... => null
clauses as this is now done in Remove_Extra_Clauses.
2017-01-23 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
......
......@@ -826,10 +826,10 @@ package body Checks is
-- Apply_Arithmetic_Overflow_Strict --
--------------------------------------
-- This routine is called only if the type is an integer type, and a
-- software arithmetic overflow check may be needed for op (add, subtract,
-- or multiply). This check is performed only if Software_Overflow_Checking
-- is enabled and Do_Overflow_Check is set. In this case we expand the
-- This routine is called only if the type is an integer type and an
-- arithmetic overflow check may be needed for op (add, subtract, or
-- multiply). This check is performed if Backend_Overflow_Checks_On_Target
-- is not enabled and Do_Overflow_Check is set. In this case we expand the
-- operation into a more complex sequence of tests that ensures that
-- overflow is properly caught.
......
......@@ -2028,14 +2028,23 @@ package body GNAT.Debug_Pools is
P := Percent (100.0 * Float (Total) / Grand_Total);
if Sort = Marked_Blocks then
Put (P'Img & "%:"
& Max (M).Count'Img & " chunks /"
& Integer (Grand_Total)'Img & " at");
else
Put (P'Img & "%:" & Total'Img & " bytes in"
& Max (M).Count'Img & " chunks at");
end if;
case Sort is
when Memory_Usage | Allocations_Count | All_Reports =>
declare
Count : constant Natural :=
Max (M).Count - Max (M).Frees;
begin
Put (P'Img & "%:" & Total'Img & " bytes in"
& Count'Img & " chunks at");
end;
when Sort_Total_Allocs =>
Put (P'Img & "%:" & Total'Img & " bytes in"
& Max (M).Count'Img & " chunks at");
when Marked_Blocks =>
Put (P'Img & "%:"
& Max (M).Count'Img & " chunks /"
& Integer (Grand_Total)'Img & " at");
end case;
end;
for J in Max (M).Traceback'Range loop
......
......@@ -2634,10 +2634,12 @@ package body Sem_Ch3 is
elsif not Analyzed (Next_Decl) and then Is_Body (Next_Decl) then
-- If there is an array type that uses a private type from an
-- enclosing package which is in the same scope as an expression
-- function that is not a completion then we cannot freeze here.
-- So identify the case here and delay freezing.
-- Check for an edge case that may cause premature freezing of a
-- private type.
-- If there is an array type which uses a private type from an
-- enclosing package that is in the same scope as a non-completing
-- expression function then we cannot freeze here.
Ignore_Freezing := False;
......@@ -2646,9 +2648,9 @@ package body Sem_Ch3 is
and then not Is_Compilation_Unit (Current_Scope)
and then not Is_Generic_Instance (Current_Scope)
then
-- Loop through all entities in the current scope to identify
-- an instance of the edge case outlined above.
-- an instance of the edge-case outlined above and ignore
-- freezeing if it is detected.
declare
Curr : Entity_Id := First_Entity (Current_Scope);
......@@ -2691,7 +2693,8 @@ package body Sem_Ch3 is
-- ??? A cleaner approach may be possible and/or this solution
-- could be extended to general-purpose late primitives, TBD.
if not ASIS_Mode and then not Body_Seen
if not ASIS_Mode
and then not Body_Seen
and then not Is_Body (Decl)
then
Body_Seen := True;
......
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