OSDN Git Service

2011-08-30 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Aug 2011 13:44:27 +0000 (13:44 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Aug 2011 13:44:27 +0000 (13:44 +0000)
* gnat_rm.texi: Minor change.
* exp_attr_light.adb: Minor reformatting.

2011-08-30  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb: Patch inheritance of aspects in
Complete_Private_Subtype, to avoid infinite loop.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178305 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/exp_attr_light.adb
gcc/ada/gnat_rm.texi
gcc/ada/sem_ch3.adb

index ae4edc3..4590435 100644 (file)
@@ -1,3 +1,13 @@
+2011-08-30  Robert Dewar  <dewar@adacore.com>
+
+       * gnat_rm.texi: Minor change.
+       * exp_attr_light.adb: Minor reformatting.
+
+2011-08-30  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch3.adb: Patch inheritance of aspects in
+       Complete_Private_Subtype, to avoid infinite loop.
+
 2011-08-30  Javier Miranda  <miranda@adacore.com>
 
        * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
index 9c63c99..95a22dd 100644 (file)
@@ -35,10 +35,11 @@ package body Exp_Attr_Light is
 
    procedure Expand_Light_N_Attribute_Reference (N : Node_Id) is
       Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N));
+
    begin
       case Id is
-         when Attribute_Old  |
-            Attribute_Result =>
+         when Attribute_Old    |
+              Attribute_Result =>
             Expand_N_Attribute_Reference (N);
 
          when others =>
index 695b809..5cc0cb6 100644 (file)
@@ -7865,20 +7865,6 @@ entity.
 @end cartouche
 Followed.
 
-@cindex pragma Volatile
-@findex Volatile
-@unnumberedsec C.6(16): Definition of effect of pragma Volatile
-@sp 1
-@cartouche
-All tasks of the program (on all processors) that read or update volatile
-variables see the same order of updates to the variables.
-@end cartouche
-
-The semantics for pragma volatile is that provided by the gcc back-end for
-implementation of volatile in C or C++. On some targets this may meet the
-serialization requirement stated above. On other targets this implementation
-advice is not followed.
-
 @cindex Package @code{Task_Attributes}
 @findex Task_Attributes
 @unnumberedsec C.7.2(30): The Package Task_Attributes
index 2d1951f..9ecfb72 100644 (file)
@@ -10312,6 +10312,7 @@ package body Sem_Ch3 is
       --  type, so we must be sure not to overwrite these entries.
 
       declare
+         Append    : Boolean;
          Item      : Node_Id;
          Next_Item : Node_Id;
 
@@ -10330,15 +10331,29 @@ package body Sem_Ch3 is
          --  is not done, as that would create a circularity.
 
          elsif Item /= First_Rep_Item (Priv) then
+            Append := True;
+
             loop
                Next_Item := Next_Rep_Item (Item);
                exit when No (Next_Item);
                Item := Next_Item;
+
+               --  If the private view has aspect specifications, the full view
+               --  inherits them. Since these aspects may already have been
+               --  attached to the full view during derivation, do not append
+               --  them if already present.
+
+               if Item = First_Rep_Item (Priv) then
+                  Append := False;
+                  exit;
+               end if;
             end loop;
 
             --  And link the private type items at the end of the chain
 
-            Set_Next_Rep_Item (Item, First_Rep_Item (Priv));
+            if Append then
+               Set_Next_Rep_Item (Item, First_Rep_Item (Priv));
+            end if;
          end if;
       end;