diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-09-27 11:54:10 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-09-27 11:54:10 +0200 |
commit | 65e78a74b676f392436fb36ee82fc0b5cc57f313 (patch) | |
tree | 0a7b6c7112ac119f5cabc47d74ee65a7bd493ba7 /gcc | |
parent | 6f5add73cd2e49d770b4ff4255f06381e8cfd6cb (diff) | |
download | gcc-65e78a74b676f392436fb36ee82fc0b5cc57f313.zip gcc-65e78a74b676f392436fb36ee82fc0b5cc57f313.tar.gz gcc-65e78a74b676f392436fb36ee82fc0b5cc57f313.tar.bz2 |
[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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 25 | ||||
-rw-r--r-- | gcc/ada/exp_aggr.adb | 6 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 18 | ||||
-rw-r--r-- | gcc/ada/par-ch3.adb | 3 | ||||
-rw-r--r-- | gcc/ada/s-taspri-posix-noaltstack.ads | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch4.adb | 5 | ||||
-rw-r--r-- | gcc/ada/sinfo.ads | 3 |
7 files changed, 47 insertions, 17 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 51e8176..e0660c0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,28 @@ +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, diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 82b7318..6cf3b16 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -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; diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 34901ab..753fea30 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -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; diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb index 897b8c9..d58bce1 100644 --- a/gcc/ada/par-ch3.adb +++ b/gcc/ada/par-ch3.adb @@ -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 diff --git a/gcc/ada/s-taspri-posix-noaltstack.ads b/gcc/ada/s-taspri-posix-noaltstack.ads index 6b279eb..ac0e743 100644 --- a/gcc/ada/s-taspri-posix-noaltstack.ads +++ b/gcc/ada/s-taspri-posix-noaltstack.ads @@ -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; diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 8bdc569..742e1c9 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -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; diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 4e239b8..3a03c04 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -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). |