public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1506] [Ada] Don't look for aliases for generic subprograms
@ 2021-06-16  8:44 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-16  8:44 UTC (permalink / raw)
  To: gcc-cvs

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

commit r12-1506-gff4746bcdefb170e9583b673d29af474b7ca0786
Author: Richard Kenner <kenner@adacore.com>
Date:   Sun Feb 28 11:00:33 2021 -0500

    [Ada] Don't look for aliases for generic subprograms
    
    gcc/ada/
    
            * exp_unst.adb (Register_Subprogram): Don't look for aliases for
            subprograms that are generic.  Reorder tests for efficiency.

Diff:
---
 gcc/ada/exp_unst.adb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index 52d6142f20d..8204fdc9bb6 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -883,9 +883,10 @@ package body Exp_Unst is
                      --  within Subp. Calls to Subp itself or to subprograms
                      --  outside the nested structure do not affect us.
 
-                     if Scope_Within (Ultimate_Alias (Ent), Subp)
-                       and then Is_Subprogram (Ent)
+                     if Is_Subprogram (Ent)
+                       and then not Is_Generic_Subprogram (Ent)
                        and then not Is_Imported (Ent)
+                       and then Scope_Within (Ultimate_Alias (Ent), Subp)
                      then
                         Append_Unique_Call ((N, Current_Subprogram, Ent));
                      end if;


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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  8:44 [gcc r12-1506] [Ada] Don't look for aliases for generic subprograms 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).