Commit 65e78a74 by Arnaud Charlet

[multiple changes]

2011-09-27  Ed Schonberg  <schonberg@adacore.com>

	* sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
	on subtype declarations.
	* exp_aggr.adb: Minor comment update.

2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_util.adb (Safe_Prefixed_Reference): Remove always-false
	test in the N_Explicit_Dereference case.  Fold double logical
	negation in the special loop case and conditionalize it on
	Variable_Ref being true.

2011-09-27  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
	single protected object and the selector is a discriminant or an
	entry family, this is a non-overloaded candidate interpretation,
	and possible primitive operations of the type must not be
	examined.

2011-09-27  Arnaud Charlet  <charlet@adacore.com>

	* s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.

From-SVN: r179255
parent 6f5add73
2011-09-27 Ed Schonberg <schonberg@adacore.com>
* sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
on subtype declarations.
* exp_aggr.adb: Minor comment update.
2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
* exp_util.adb (Safe_Prefixed_Reference): Remove always-false
test in the N_Explicit_Dereference case. Fold double logical
negation in the special loop case and conditionalize it on
Variable_Ref being true.
2011-09-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
single protected object and the selector is a discriminant or an
entry family, this is a non-overloaded candidate interpretation,
and possible primitive operations of the type must not be
examined.
2011-09-27 Arnaud Charlet <charlet@adacore.com>
* s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2011-09-27 Pascal Obry <obry@adacore.com>
* s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
......
......@@ -229,6 +229,11 @@ package body Exp_Aggr is
-- Packed_Array_Aggregate_Handled, we set this parameter to True, since
-- these are cases we handle in there.
-- It would seem worthwhile to have a higher default value for Max_Others_
-- replicate, but aggregates in the compiler make this impossible: the
-- compiler bootstrap fails if Max_Others_Replicate is greater than 25.
-- This is unexpected ???
procedure Expand_Array_Aggregate (N : Node_Id);
-- This is the top-level routine to perform array aggregate expansion.
-- N is the N_Aggregate node to be expanded.
......@@ -4705,6 +4710,7 @@ package body Exp_Aggr is
and then Static_Elaboration_Desired (Current_Scope)
then
Convert_To_Positional (N, Max_Others_Replicate => 100);
else
Convert_To_Positional (N);
end if;
......
......@@ -5912,30 +5912,22 @@ package body Exp_Util is
-- We do NOT exclude dereferences of access-to-constant types because
-- we handle them as constant view of variables.
-- Exception is an access to an entity that is a constant or an
-- in-parameter.
elsif Nkind (Prefix (N)) = N_Explicit_Dereference
and then Variable_Ref
then
declare
DDT : constant Entity_Id :=
Designated_Type (Etype (Prefix (Prefix (N))));
begin
return Ekind_In (DDT, E_Constant, E_In_Parameter);
end;
return False;
-- The following test is the simplest way of solving a complex
-- problem uncovered by BB08-010: Side effect on loop bound that
-- problem uncovered by B808-010: Side effect on loop bound that
-- is a subcomponent of a global variable:
-- If a loop bound is a subcomponent of a global variable, a
-- modification of that variable within the loop may incorrectly
-- affect the execution of the loop.
elsif not
(Nkind (Parent (Parent (N))) /= N_Loop_Parameter_Specification
or else not Within_In_Parameter (Prefix (N)))
elsif Nkind (Parent (Parent (N))) = N_Loop_Parameter_Specification
and then Within_In_Parameter (Prefix (N))
and then Variable_Ref
then
return False;
......
......@@ -951,7 +951,8 @@ package body Ch3 is
--------------------------------
-- SUBTYPE_DECLARATION ::=
-- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
-- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
-- {ASPECT_SPECIFICATIONS];
-- The caller has checked that the initial token is SUBTYPE
......
......@@ -79,8 +79,8 @@ package System.Task_Primitives is
private
type Lock is record
WO : System.OS_Interface.pthread_mutex_t;
RW : System.OS_Interface.pthread_rwlock_t;
WO : aliased System.OS_Interface.pthread_mutex_t;
RW : aliased System.OS_Interface.pthread_rwlock_t;
end record;
type RTS_Lock is new System.OS_Interface.pthread_mutex_t;
......
......@@ -4125,6 +4125,11 @@ package body Sem_Ch4 is
Set_Entity_With_Style_Check (Sel, Comp);
Generate_Reference (Comp, Sel);
-- The selector is not overloadable, so we have a candidate
-- interpretation.
Has_Candidate := True;
else
goto Next_Comp;
end if;
......
......@@ -2191,7 +2191,8 @@ package Sinfo is
--------------------------------
-- SUBTYPE_DECLARATION ::=
-- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
-- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
-- [ASPECT_SPECIFICATIONS];
-- The subtype indication field is set to Empty for subtypes
-- declared in package Standard (Positive, Natural).
......
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