aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_unst.adb
diff options
context:
space:
mode:
authorRichard Kenner <kenner@adacore.com>2021-02-28 11:00:33 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-16 04:43:00 -0400
commitff4746bcdefb170e9583b673d29af474b7ca0786 (patch)
tree91b4da7f0033a720df847cf04508b9a11a0e60a1 /gcc/ada/exp_unst.adb
parente505bf515f59e9c914101fdbd45ffeda9b51040f (diff)
downloadgcc-ff4746bcdefb170e9583b673d29af474b7ca0786.zip
gcc-ff4746bcdefb170e9583b673d29af474b7ca0786.tar.gz
gcc-ff4746bcdefb170e9583b673d29af474b7ca0786.tar.bz2
[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.
Diffstat (limited to 'gcc/ada/exp_unst.adb')
-rw-r--r--gcc/ada/exp_unst.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index 52d6142..8204fdc 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;