]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 27 Sep 2011 09:54:10 +0000 (11:54 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 27 Sep 2011 09:54:10 +0000 (11:54 +0200)
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

gcc/ada/ChangeLog
gcc/ada/exp_aggr.adb
gcc/ada/exp_util.adb
gcc/ada/par-ch3.adb
gcc/ada/s-taspri-posix-noaltstack.ads
gcc/ada/sem_ch4.adb
gcc/ada/sinfo.ads

index 51e8176bda3d2faacf49cd874a1c924670849744..e0660c0f31c7f07924b07d64b87fe6a294912e63 100644 (file)
@@ -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,
index 82b73188b267995c94d6c7efcf6ab62800d192ed..6cf3b16897215053fbf20bbc524b38003e256575 100644 (file)
@@ -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;
index 34901abafd48fcc089c7f27b9c6b8ab9481f8734..753fea30bfacf8fbbc5294da61d422ab978996a6 100644 (file)
@@ -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;
 
index 897b8c96b4e2c783041f403db0a5a0c3928eca50..d58bce1045159e63ac8b61b8ff9a41b33b58bdd9 100644 (file)
@@ -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
 
index 6b279eb63c2edc7478bd263fa1bd4d5232d2be59..ac0e743af8f6e142a6eecdf1d91bbfba1011a8ff 100644 (file)
@@ -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;
index 8bdc569d1e7a04c5a102a12631fe7698c885b7ef..742e1c9afae81e7b103279eea30fddbc10db06f7 100644 (file)
@@ -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;
index 4e239b8203b5d59671d223a147435ba492804e8d..3a03c04c7e65e86f9492de4e212fedbd61baa555 100644 (file)
@@ -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).