From: Pierre-Marie de Rodat <derodat@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Eric Botcazou <ebotcazou@adacore.com>
Subject: [Ada] Do not freeze specifically for dispatch tables
Date: Mon, 30 May 2022 08:32:46 +0000 [thread overview]
Message-ID: <20220530083246.GA210785@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 267 bytes --]
The left-overs of the old freezing code in Make_DT are now redundant since
the semantic analyzer performs the same task for the 'Access attribute.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.adb (Make_DT): Remove remaining freezing code.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 1555 bytes --]
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -4469,35 +4469,6 @@ package body Exp_Disp is
Parent_Typ := Full_View (Parent_Typ);
end if;
- -- Ensure that all the primitives are frozen. This is only required when
- -- building static dispatch tables: the primitives must be frozen to be
- -- referenced, otherwise we have problems with the back end. But this is
- -- not a requirement with nonstatic dispatch tables because in this case
- -- we generate an empty dispatch table at this point and the extra code
- -- required to register the primitives in their slot will be generated
- -- later, when each primitive is frozen (see Freeze_Subprogram).
-
- if Building_Static_DT (Typ) then
- declare
- F_List : List_Id;
- Prim : Entity_Id;
- Prim_Elmt : Elmt_Id;
-
- begin
- Prim_Elmt := First_Elmt (Primitive_Operations (Typ));
- while Present (Prim_Elmt) loop
- Prim := Node (Prim_Elmt);
- F_List := Freeze_Entity (Prim, Typ, Do_Freeze_Profile => False);
-
- if Present (F_List) then
- Append_List_To (Result, F_List);
- end if;
-
- Next_Elmt (Prim_Elmt);
- end loop;
- end;
- end if;
-
if not Is_Interface (Typ) and then Has_Interfaces (Typ) then
declare
Cannot_Have_Null_Disc : Boolean := False;
reply other threads:[~2022-05-30 8:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220530083246.GA210785@adacore.com \
--to=derodat@adacore.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).