public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-2127] [Ada] Front-end inlining and instantiations of UC
Date: Wed,  7 Jul 2021 16:26:41 +0000 (GMT)	[thread overview]
Message-ID: <20210707162641.9EF56395C40F@sourceware.org> (raw)

https://gcc.gnu.org/g:18b267aeeb126290355ec394fbc0f6a1fba1f340

commit r12-2127-g18b267aeeb126290355ec394fbc0f6a1fba1f340
Author: Arnaud Charlet <charlet@adacore.com>
Date:   Thu May 20 06:40:48 2021 -0400

    [Ada] Front-end inlining and instantiations of UC
    
    gcc/ada/
    
            * sem_ch12.adb (Analyze_Subprogram_Instantiation): Mark Anon_Id
            intrinsic before calling Analyze_Instance_And_Renamings because
            this flag may be propagated to other nodes.

Diff:
---
 gcc/ada/sem_ch12.adb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 1c8f64e215e..bf51ce9e7e1 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -5796,6 +5796,14 @@ package body Sem_Ch12 is
             Set_SPARK_Mode (Gen_Unit);
          end if;
 
+         --  Need to mark Anon_Id intrinsic before calling
+         --  Analyze_Instance_And_Renamings because this flag may be propagated
+         --  to other nodes.
+
+         if Is_Intrinsic_Subprogram (Gen_Unit) then
+            Set_Is_Intrinsic_Subprogram (Anon_Id);
+         end if;
+
          Analyze_Instance_And_Renamings;
 
          --  Restore SPARK_Mode from the context after analysis of the package
@@ -5817,7 +5825,6 @@ package body Sem_Ch12 is
          --  not within the main unit.
 
          if Is_Intrinsic_Subprogram (Gen_Unit) then
-            Set_Is_Intrinsic_Subprogram (Anon_Id);
             Set_Is_Intrinsic_Subprogram (Act_Decl_Id);
 
             if Chars (Gen_Unit) = Name_Unchecked_Conversion then


                 reply	other threads:[~2021-07-07 16:26 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=20210707162641.9EF56395C40F@sourceware.org \
    --to=pmderodat@gcc.gnu.org \
    --cc=gcc-cvs@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).