[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 20 Oct 2015 10:53:39 +0000 (12:53 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 20 Oct 2015 10:53:39 +0000 (12:53 +0200)
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

gcc/ada/ChangeLog
gcc/ada/debug.adb
gcc/ada/par_sco.adb
gcc/ada/sem_smem.adb

index 1278c0a9cc8ff60654e1c34039060c9f8089a0b8..5e189a1c907bd88bc40636580d34c09a9a32e146 100644 (file)
@@ -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
index 0ee0a9864b25e50b9b2efdfd8d6f4b303359a39d..29872b630a068f6df109dfa22b19148adcc73f90 100644 (file)
@@ -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
index 8593dab63d287a58805c506bcf2fcab6de3c2dcc..c1e6f03778198b0b80f9e2250247053c460bef28 100644 (file)
@@ -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;
 
index bca184ef65893b87f5a8a3935c7638fa894ccea8..6a25501479e6d0643b902a73c47d0c7b6d486b93 100644 (file)
@@ -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);