From: Richard Kenner Date: Sun, 28 Feb 2021 16:00:33 +0000 (-0500) Subject: [Ada] Don't look for aliases for generic subprograms X-Git-Tag: basepoints/gcc-13~6807 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff4746bcdefb170e9583b673d29af474b7ca0786;p=thirdparty%2Fgcc.git [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 --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index 52d6142f20dc..8204fdc9bb64 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;