aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2021-02-11 14:08:35 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-15 06:19:34 -0400
commit4cee20bb1ebbe66d4065c33da9f8743683228ede (patch)
tree3308a3fed5bc1437d1949de9a99c3a6fdf2c2df9
parent903655af70232eee31e5d83c59a45fa4d9e9ab00 (diff)
downloadgcc-4cee20bb1ebbe66d4065c33da9f8743683228ede.zip
gcc-4cee20bb1ebbe66d4065c33da9f8743683228ede.tar.gz
gcc-4cee20bb1ebbe66d4065c33da9f8743683228ede.tar.bz2
[Ada] Fix handling of scopes for subprogram calls in unnesting
gcc/ada/ * exp_unst.adb (Unnest_Subprogram.Build_Table.Visit_Node): Fix handling of scopes for subprogram calls.
-rw-r--r--gcc/ada/exp_unst.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index 6fd7a0e..52d6142 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -883,7 +883,7 @@ 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 (Ent, Subp)
+ if Scope_Within (Ultimate_Alias (Ent), Subp)
and then Is_Subprogram (Ent)
and then not Is_Imported (Ent)
then