This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Fix assertion failures with -gnatde and -gnatdv

This fixes a couple of assertion failures when using -gnatde and -gnatdv
on a compiler built with assertions enabled.  No functional changes.

Tested on x86_64-pc-linux-gnu, committed on trunk

2018-12-03  Eric Botcazou  <>


	* einfo.adb (Write_Entity_Info): Don't take Scope of Standard
	* sem_ch4.adb (Remove_Abstract_Operations): Add missing blank
	lines to -gnatdv output.
	* sem_type.adb (Write_Overloads): Take Entity of entity names
--- gcc/ada/einfo.adb
+++ gcc/ada/einfo.adb
@@ -10032,7 +10032,9 @@ package body Einfo is
       Write_Attribute ("   Type    ", Etype (Id));
-      Write_Attribute ("   Scope   ", Scope (Id));
+      if Id /= Standard_Standard then
+         Write_Attribute ("   Scope   ", Scope (Id));
+      end if;
       case Ekind (Id) is

--- gcc/ada/sem_ch4.adb
+++ gcc/ada/sem_ch4.adb
@@ -7509,7 +7509,7 @@ package body Sem_Ch4 is
       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;

--- gcc/ada/sem_type.adb
+++ gcc/ada/sem_type.adb
@@ -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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]