aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-12-03 15:49:00 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-12-03 15:49:00 +0000
commitba301a3b6633691e09e7ea58a2c1fe559203ad8a (patch)
tree0f52804583e24a21c68148e09ab66175a46f9a31
parent89beb6536755b02c83289fedd6182b79565a08fb (diff)
downloadgcc-ba301a3b6633691e09e7ea58a2c1fe559203ad8a.zip
gcc-ba301a3b6633691e09e7ea58a2c1fe559203ad8a.tar.gz
gcc-ba301a3b6633691e09e7ea58a2c1fe559203ad8a.tar.bz2
[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. 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
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/einfo.adb4
-rw-r--r--gcc/ada/sem_ch4.adb4
-rw-r--r--gcc/ada/sem_type.adb6
4 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5397c76..49bf8c2 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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,
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 52a9435..390f444 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -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
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 5176175..72dfd45 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -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;
diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
index b499117..6a24869 100644
--- a/gcc/ada/sem_type.adb
+++ b/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);