aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-10-20 12:53:39 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-20 12:53:39 +0200
commitcbc61965f524912017883739bf1fe2e6f30439c5 (patch)
tree8bca6ce4f3ba7d757fbbce067f82c26f2c0ad29f /gcc
parent847d950d3a26b03229a289bfaa5163a5352ed7f4 (diff)
downloadgcc-cbc61965f524912017883739bf1fe2e6f30439c5.zip
gcc-cbc61965f524912017883739bf1fe2e6f30439c5.tar.gz
gcc-cbc61965f524912017883739bf1fe2e6f30439c5.tar.bz2
[multiple changes]
2015-10-20 Ed Schonberg <schonberg@adacore.com> * sem_smem.adb (Check_Shared_Var): Clean up code that handles type declarations with discriminants, remove obsolete check. 2015-10-20 Arnaud Charlet <charlet@adacore.com> * par_sco.adb: Minor style fixes. 2015-10-20 Vincent Celier <celier@adacore.com> * debug.adb: Update documentation of -gnatdu. From-SVN: r229048
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog13
-rw-r--r--gcc/ada/debug.adb11
-rw-r--r--gcc/ada/par_sco.adb7
-rw-r--r--gcc/ada/sem_smem.adb9
4 files changed, 30 insertions, 10 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 1278c0a..5e189a1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,16 @@
+2015-10-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_smem.adb (Check_Shared_Var): Clean up code that handles
+ type declarations with discriminants, remove obsolete check.
+
+2015-10-20 Arnaud Charlet <charlet@adacore.com>
+
+ * par_sco.adb: Minor style fixes.
+
+2015-10-20 Vincent Celier <celier@adacore.com>
+
+ * debug.adb: Update documentation of -gnatdu.
+
2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb Add aspect Volatile_Function to table
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
index 0ee0a98..29872b6 100644
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -316,14 +316,15 @@ package body Debug is
-- dt Print full tree. The generated tree is output (see also df,dy)
-- du Uncheck categorization pragmas. This debug switch causes the
- -- categorization pragmas (Pure, Preelaborate etc) to be ignored
- -- so that normal checks are not made (this is particularly useful
- -- for adding temporary debugging code to units that have pragmas
- -- that are inconsistent with the debugging code added.
+ -- elaboration control pragmas (Pure, Preelaborate, etc.) and the
+ -- categorization pragmas (Shared_Passive, Remote_Types, etc.) to be
+ -- ignored, so that normal checks are not made (this is particularly
+ -- useful for adding temporary debugging code to units that have
+ -- pragmas that are inconsistent with the debugging code added).
-- dv Output trace of overload resolution. Outputs messages for
-- overload attempts that involve cascaded errors, or where
- -- an interepretation is incompatible with the context.
+ -- an interpretation is incompatible with the context.
-- dw Write semantic scope stack messages. Each time a scope is created
-- or removed, a message is output (see the Sem_Ch8.Push_Scope and
diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb
index 8593dab..c1e6f03 100644
--- a/gcc/ada/par_sco.adb
+++ b/gcc/ada/par_sco.adb
@@ -851,11 +851,12 @@ package body Par_SCO is
-- Now we have the definitive set of SCO entries, register them in the
-- corresponding hash table.
- for I in 1 .. Hash_Entries.Last loop
+ for J in 1 .. Hash_Entries.Last loop
SCO_Raw_Hash_Table.Set
- (Hash_Entries.Table (I).Sloc,
- Hash_Entries.Table (I).SCO_Index);
+ (Hash_Entries.Table (J).Sloc,
+ Hash_Entries.Table (J).SCO_Index);
end loop;
+
Hash_Entries.Free;
end Process_Decisions;
diff --git a/gcc/ada/sem_smem.adb b/gcc/ada/sem_smem.adb
index bca184e..6a25501 100644
--- a/gcc/ada/sem_smem.adb
+++ b/gcc/ada/sem_smem.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -92,6 +92,8 @@ package body Sem_Smem is
elsif Is_Record_Type (T)
and then not Is_Constrained (T)
+ and then (Nkind (N) /= N_Object_Declaration
+ or else No (Expression (N)))
then
Error_Msg_N
("unconstrained variant records " &
@@ -116,9 +118,12 @@ package body Sem_Smem is
elsif Is_Record_Type (T) then
if Has_Discriminants (T) then
+
+ -- Check for access discriminants.
+
C := First_Discriminant (T);
while Present (C) loop
- if Comes_From_Source (C) then
+ if Is_Access_Type (Etype (C)) then
return True;
else
C := Next_Discriminant (C);