OSDN Git Service

2011-08-05 Vincent Celier <celier@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Aug 2011 14:21:03 +0000 (14:21 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Aug 2011 14:21:03 +0000 (14:21 +0000)
* gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
delete or close the file when the call to gnatmake was successful.

2011-08-05  Yannick Moy  <moy@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
Global_Discard_Names.

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

* sinfo.ads: comments on use of entity field for aspect specifications.

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

* sem_ch12.adb (Reset_Entity): If the entity field of the associated
node is not itself an entity but a selected component, it is a
rewritten parameterless call to an en enclosing synchronized operation,
and this expansion will be performed again in the instance, so there is
no global information to preserve.

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

gcc/ada/ChangeLog
gcc/ada/gnat1drv.adb
gcc/ada/gnatcmd.adb
gcc/ada/sem_ch12.adb
gcc/ada/sinfo.ads

index 13fdfcc..14db29d 100644 (file)
@@ -1,3 +1,25 @@
+2011-08-05  Vincent Celier  <celier@adacore.com>
+
+       * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
+       delete or close the file when the call to gnatmake was successful.
+
+2011-08-05  Yannick Moy  <moy@adacore.com>
+
+       * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
+       Global_Discard_Names.
+
+2011-08-05  Ed Schonberg  <schonberg@adacore.com>
+
+       * sinfo.ads: comments on use of entity field for aspect specifications.
+
+2011-08-05  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch12.adb (Reset_Entity): If the entity field of the associated
+       node is not itself an entity but a selected component, it is a
+       rewritten parameterless call to an en enclosing synchronized operation,
+       and this expansion will be performed again in the instance, so there is
+       no global information to preserve.
+
 2011-08-05  Javier Miranda  <miranda@adacore.com>
 
        * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
index be04785..653a10c 100644 (file)
@@ -464,6 +464,10 @@ procedure Gnat1drv is
 
          Warning_Mode := Suppress;
 
+         --  Suppress the generation of name tables for enumerations
+
+         Global_Discard_Names := True;
+
          --  Always perform semantics and generate ALI files in ALFA mode,
          --  so that a gnatmake -c -k will proceed further when possible.
 
index 0fd1d94..ec9c4e9 100644 (file)
@@ -927,11 +927,20 @@ procedure GNATCmd is
             end if;
          end loop;
 
-         if not Keep_Temporary_Files then
-            Delete (File);
-         else
-            Close (File);
-         end if;
+         begin
+            if not Keep_Temporary_Files then
+               Delete (File);
+            else
+               Close (File);
+            end if;
+
+         --  Don't crash if it is not possible to delete or close the file,
+         --  just ignore the situation.
+
+         exception
+            when others =>
+               null;
+         end;
       end if;
    end Get_Closure;
 
index 97cbd07..278552d 100644 (file)
@@ -11887,11 +11887,27 @@ package body Sem_Ch12 is
          N2 := Get_Associated_Node (N);
          E := Entity (N2);
 
-         --  If the entity is an itype created as a subtype of an access type
-         --  with a null exclusion restore source entity for proper visibility.
-         --  The itype will be created anew in the instance.
-
          if Present (E) then
+
+            --  If the node is an entry call to an entry in an enclosing task,
+            --  it is rewritten as a selected component. No global entity
+            --  to preserve in this case, the expansion will be redone in the
+            --  instance.
+
+            if not Nkind_In (E,
+              N_Defining_Identifier,
+              N_Defining_Character_Literal,
+              N_Defining_Operator_Symbol)
+            then
+               Set_Associated_Node (N, Empty);
+               Set_Etype  (N, Empty);
+               return;
+            end if;
+
+            --  If the entity is an itype created as a subtype of an access
+            --  type with a null exclusion restore source entity for proper
+            --  visibility. The itype will be created anew in the instance.
+
             if Is_Itype (E)
               and then Ekind (E) = E_Access_Subtype
               and then Is_Entity_Name (N)
index 13ee674..c9e0512 100644 (file)
@@ -943,6 +943,12 @@ package Sinfo is
    --    there is no requirement that these match, and there are obscure cases
    --    of generated code where they do not match.
 
+   --    Note: Aspect specifications, introduced in Ada2012, require additional
+   --    links between identifiers and various attributes. These attributes
+   --    can be of arbitrary types, and the entity field of identifiers that
+   --    denote aspects must be used to store arbitrary expressions for later
+   --    semantic checks. See section on Aspect specifications for details.
+
    --  Entity_Or_Associated_Node (Node4-Sem)
    --    A synonym for both Entity and Associated_Node. Used by convention in
    --    the code when referencing this field in cases where it is not known