diff options
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index b8d8e70..e7b0b8b 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -46,6 +46,7 @@ with Inline; use Inline; with Itypes; use Itypes; with Lib; use Lib; with Lib.Xref; use Lib.Xref; +with Local_Restrict; with Namet; use Namet; with Nmake; use Nmake; with Nlists; use Nlists; @@ -6783,6 +6784,13 @@ package body Sem_Res is Check_Ghost_Context (Nam, N); end if; + if Is_Entity_Name (Subp) then + Local_Restrict.Check_Call + (Call => N, Callee => Ultimate_Alias (Nam)); + else + Local_Restrict.Check_Call (Call => N); + end if; + -- If we are calling the current subprogram from immediately within its -- body, then that is the case where we can sometimes detect cases of -- infinite recursion statically. Do not try this in case restriction |