aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index eaaa26f..aa551ac 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -5447,9 +5447,14 @@ package body Sem_Res is
Check_Potentially_Blocking_Operation (N);
end if;
- -- Issue an error for a call to an eliminated subprogram
+ -- Issue an error for a call to an eliminated subprogram. We skip this
+ -- in a spec expression, e.g. a call in a default parameter value, since
+ -- we are not really doing a call at this time. That's important because
+ -- the spec expression may itself belong to an eliminated subprogram.
- Check_For_Eliminated_Subprogram (Subp, Nam);
+ if not In_Spec_Expression then
+ Check_For_Eliminated_Subprogram (Subp, Nam);
+ end if;
-- All done, evaluate call and deal with elaboration issues