public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6363] [Ada] Spurious error caused by order of interfaces in full view
@ 2022-01-07 16:28 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-01-07 16:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e2b07ba054daa896795e0932626f259c87417ec0

commit r12-6363-ge2b07ba054daa896795e0932626f259c87417ec0
Author: Javier Miranda <miranda@adacore.com>
Date:   Mon Dec 20 11:51:44 2021 +0000

    [Ada] Spurious error caused by order of interfaces in full view
    
    gcc/ada/
    
            * sem_ch3.adb (Reorder_Interfaces): When the conflicting
            interface is identified we just replace the interface in the
            list of interfaces of the tagged type (instead of adding a
            duplicate to the list of interfaces).

Diff:
---
 gcc/ada/sem_ch3.adb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index ce5f4536a26..bd51c5b3337 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -17272,7 +17272,6 @@ package body Sem_Ch3 is
             --  append the full view's original parent to the interface list,
             --  recursively call Derived_Type_Definition on the full type, and
             --  return True. If a match is not found, return False.
-            --  ??? This seems broken in the case of generic packages.
 
             ------------------------
             -- Reorder_Interfaces --
@@ -17281,6 +17280,7 @@ package body Sem_Ch3 is
             function Reorder_Interfaces return Boolean is
                Iface     : Node_Id;
                New_Iface : Node_Id;
+
             begin
                Iface := First (Interface_List (Def));
                while Present (Iface) loop
@@ -17290,7 +17290,7 @@ package body Sem_Ch3 is
 
                      New_Iface :=
                        Make_Identifier (Sloc (N), Chars (Parent_Type));
-                     Append (New_Iface, Interface_List (Def));
+                     Rewrite (Iface, New_Iface);
 
                      --  Analyze the transformed code


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-07 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 16:28 [gcc r12-6363] [Ada] Spurious error caused by order of interfaces in full view Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).