From: Arnaud Charlet Date: Tue, 27 Sep 2011 09:54:10 +0000 (+0200) Subject: [multiple changes] X-Git-Tag: releases/gcc-4.7.0~3526 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65e78a74b676f392436fb36ee82fc0b5cc57f313;p=thirdparty%2Fgcc.git [multiple changes] 2011-09-27 Ed Schonberg * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification on subtype declarations. * exp_aggr.adb: Minor comment update. 2011-09-27 Eric Botcazou * 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 * 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 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased. From-SVN: r179255 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 51e8176bda3d..e0660c0f31c7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,28 @@ +2011-09-27 Ed Schonberg + + * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification + on subtype declarations. + * exp_aggr.adb: Minor comment update. + +2011-09-27 Eric Botcazou + + * 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 + + * 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 + + * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased. + 2011-09-27 Pascal Obry * 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 82b73188b267..6cf3b1689721 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 34901abafd48..753fea30bfac 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 897b8c96b4e2..d58bce104515 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 6b279eb63c2e..ac0e743af8f6 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 8bdc569d1e7a..742e1c9afae8 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 4e239b8203b5..3a03c04c7e65 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).