[COMMITTED] ada: Remove dead detection of recursive inlined subprograms
Checks
Commit Message
From: Piotr Trojanek <trojanek@adacore.com>
Inlining of subprogram calls happens in routine Expand_Inlined_Call
which calls Establish_Actual_Mapping_For_Inlined_Call. Both routines
had detection of recursive calls. The detection in the second routine
was dead code.
gcc/ada/
* inline.adb (Establish_Actual_Mapping_For_Inlined_Call):
Remove detection of recursive calls.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/inline.adb | 19 -------------------
1 file changed, 19 deletions(-)
@@ -2988,25 +2988,6 @@ package body Inline is
F := First_Formal (Subp);
A := First_Actual (N);
while Present (F) loop
- if Present (Renamed_Object (F)) then
-
- -- If expander is active, it is an error to try to inline a
- -- recursive subprogram. In GNATprove mode, just indicate that the
- -- inlining will not happen, and mark the subprogram as not always
- -- inlined.
-
- if GNATprove_Mode then
- Cannot_Inline
- ("cannot inline call to recursive subprogram?", N, Subp);
- Set_Is_Inlined_Always (Subp, False);
- else
- Error_Msg_N
- ("cannot inline call to recursive subprogram", N);
- end if;
-
- return;
- end if;
-
-- Reset Last_Assignment for any parameters of mode out or in out, to
-- prevent spurious warnings about overwriting for assignments to the
-- formal in the inlined code.