public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-877] [Ada] Use Actions field of freeze nodes for subprograms (continued)
@ 2022-06-01  8:44 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-06-01  8:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:73514ab714d651795c10e0790217a67eb6b41b48

commit r13-877-g73514ab714d651795c10e0790217a67eb6b41b48
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Mon May 2 10:57:46 2022 +0200

    [Ada] Use Actions field of freeze nodes for subprograms (continued)
    
    This case was missed in the previous change.
    
    gcc/ada/
    
            * exp_ch6.adb (Freeze_Subprogram.Register_Predefined_DT_Entry): Put
            the actions into the Actions field of the freeze node instead of
            inserting them after it.

Diff:
---
 gcc/ada/exp_ch6.adb | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 7d507271428..3b5d59ca873 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -7839,6 +7839,7 @@ package body Exp_Ch6 is
 
       procedure Register_Predefined_DT_Entry (Prim : Entity_Id) is
          Iface_DT_Ptr : Elmt_Id;
+         L            : List_Id;
          Tagged_Typ   : Entity_Id;
          Thunk_Id     : Entity_Id;
          Thunk_Code   : Node_Id;
@@ -7871,7 +7872,7 @@ package body Exp_Ch6 is
               Iface => Related_Type (Node (Iface_DT_Ptr)));
 
             if Present (Thunk_Code) then
-               Insert_Actions_After (N, New_List (
+               L := New_List (
                  Thunk_Code,
 
                  Build_Set_Predefined_Prim_Op_Address (Loc,
@@ -7894,7 +7895,14 @@ package body Exp_Ch6 is
                      Unchecked_Convert_To (RTE (RE_Prim_Ptr),
                        Make_Attribute_Reference (Loc,
                          Prefix         => New_Occurrence_Of (Prim, Loc),
-                         Attribute_Name => Name_Unrestricted_Access)))));
+                         Attribute_Name => Name_Unrestricted_Access))));
+
+               if No (Actions (N)) then
+                  Set_Actions (N, L);
+
+               else
+                  Append_List (L, Actions (N));
+               end if;
             end if;
 
             --  Skip the tag of the predefined primitives dispatch table


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

only message in thread, other threads:[~2022-06-01  8:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01  8:44 [gcc r13-877] [Ada] Use Actions field of freeze nodes for subprograms (continued) 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).