aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-05 16:21:03 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-05 16:21:03 +0200
commit822868aa564816380d7928a6ead984524abc8259 (patch)
treeeba2b26100e99f621767619903ed5d74dd4acaa2 /gcc
parent44a10091cf20b5f4580c4e7bc33e8162acce97dc (diff)
downloadgcc-822868aa564816380d7928a6ead984524abc8259.zip
gcc-822868aa564816380d7928a6ead984524abc8259.tar.gz
gcc-822868aa564816380d7928a6ead984524abc8259.tar.bz2
[multiple changes]
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. From-SVN: r177443
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog22
-rw-r--r--gcc/ada/gnat1drv.adb4
-rw-r--r--gcc/ada/gnatcmd.adb19
-rw-r--r--gcc/ada/sem_ch12.adb24
-rw-r--r--gcc/ada/sinfo.ads6
5 files changed, 66 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 13fdfcc..14db29d 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index be04785..653a10c 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -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.
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 0fd1d94..ec9c4e9 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -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;
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 97cbd07..278552d 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -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)
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 13ee674..c9e0512 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -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