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-4030] [Ada] Subprogram_Variant in ignored ghost code
Date: Fri,  1 Oct 2021 06:16:39 +0000 (GMT)	[thread overview]
Message-ID: <20211001061639.087D63857C6F@sourceware.org> (raw)

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

commit r12-4030-gea0b5b656a0e90bc9bb3ab0920796b24a9387d76
Author: Bob Duff <duff@adacore.com>
Date:   Tue Aug 17 11:02:51 2021 -0400

    [Ada] Subprogram_Variant in ignored ghost code
    
    gcc/ada/
    
            * exp_ch6.adb (Expand_Call_Helper): Do not call
            Check_Subprogram_Variant if the subprogram is an ignored ghost
            entity. Otherwise the compiler crashes (in debug builds) or
            gives strange error messages (in production builds).

Diff:
---
 gcc/ada/exp_ch6.adb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index ffd14759a7f..ce0bb80825d 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -4392,6 +4392,7 @@ package body Exp_Ch6 is
       --  the current subprogram is called.
 
       if Is_Subprogram (Subp)
+        and then not Is_Ignored_Ghost_Entity (Subp)
         and then Same_Or_Aliased_Subprograms (Subp, Current_Scope)
       then
          Check_Subprogram_Variant;


                 reply	other threads:[~2021-10-01  6:16 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=20211001061639.087D63857C6F@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).