[Ada] Fix assertion failures with -gnatde and -gnatdv
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 3 Dec 2018 15:49:00 +0000 (15:49 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 3 Dec 2018 15:49:00 +0000 (15:49 +0000)
This fixes a couple of assertion failures when using -gnatde and -gnatdv
on a compiler built with assertions enabled.  No functional changes.

2018-12-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* einfo.adb (Write_Entity_Info): Don't take Scope of Standard
package.
* sem_ch4.adb (Remove_Abstract_Operations): Add missing blank
lines to -gnatdv output.
* sem_type.adb (Write_Overloads): Take Entity of entity names
only.

From-SVN: r266751

gcc/ada/ChangeLog
gcc/ada/einfo.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_type.adb

index 5397c76502c912701169fbaad27a84645102e490..49bf8c26daef1b10cab73dbb834d736966d76d05 100644 (file)
@@ -1,3 +1,12 @@
+2018-12-03  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * einfo.adb (Write_Entity_Info): Don't take Scope of Standard
+       package.
+       * sem_ch4.adb (Remove_Abstract_Operations): Add missing blank
+       lines to -gnatdv output.
+       * sem_type.adb (Write_Overloads): Take Entity of entity names
+       only.
+
 2018-12-03  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * checks.adb, exp_aggr.adb, exp_attr.adb, exp_ch3.adb,
index 52a9435fdeb17f0d315dda2061b6209de740687c..390f4444e0cad5707f95119f783e36444f1d42bf 100644 (file)
@@ -10032,7 +10032,9 @@ package body Einfo is
       Write_Eol;
       Write_Attribute ("   Type    ", Etype (Id));
       Write_Eol;
-      Write_Attribute ("   Scope   ", Scope (Id));
+      if Id /= Standard_Standard then
+         Write_Attribute ("   Scope   ", Scope (Id));
+      end if;
       Write_Eol;
 
       case Ekind (Id) is
index 5176175d434ee0ba4b80bf0d3f38c0845b739537..72dfd457e9e87018b6562ce8f79e30a4962c04b7 100644 (file)
@@ -7509,7 +7509,7 @@ package body Sem_Ch4 is
    begin
       if Is_Overloaded (N) then
          if Debug_Flag_V then
-            Write_Str ("Remove_Abstract_Operations: ");
+            Write_Line ("Remove_Abstract_Operations: ");
             Write_Overloads (N);
          end if;
 
@@ -7704,7 +7704,7 @@ package body Sem_Ch4 is
          end if;
 
          if Debug_Flag_V then
-            Write_Str ("Remove_Abstract_Operations done: ");
+            Write_Line ("Remove_Abstract_Operations done: ");
             Write_Overloads (N);
          end if;
       end if;
index b499117e743c6d61850a449d87290fd9c96d4789..6a24869c7d085aa49ab74ebced9c760eadcced76 100644 (file)
@@ -3608,8 +3608,10 @@ package body Sem_Type is
       Print_Node_Briefly (N);
 
       if not Is_Overloaded (N) then
-         Write_Line ("Non-overloaded entity ");
-         Write_Entity_Info (Entity (N), " ");
+         if Is_Entity_Name (N) then
+            Write_Line ("Non-overloaded entity ");
+            Write_Entity_Info (Entity (N), " ");
+         end if;
 
       elsif Nkind (N) not in N_Has_Entity then
          Get_First_Interp (N, I, It);