public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4030] [Ada] Subprogram_Variant in ignored ghost code
@ 2021-10-01  6:16 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-01  6:16 UTC (permalink / raw)
  To: gcc-cvs

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;


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

only message in thread, other threads:[~2021-10-01  6:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01  6:16 [gcc r12-4030] [Ada] Subprogram_Variant in ignored ghost code 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).