aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-12-05 16:05:10 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-01-09 14:13:31 +0100
commit00a97303c2ab27263b18a008a389c3567650123b (patch)
tree1e5d7725c4513c89bfa3ead472d0598b248d3795 /gcc/ada
parent31f905391fb09c0de99da3d500623bdbd9aa0cc2 (diff)
downloadgcc-00a97303c2ab27263b18a008a389c3567650123b.zip
gcc-00a97303c2ab27263b18a008a389c3567650123b.tar.gz
gcc-00a97303c2ab27263b18a008a389c3567650123b.tar.bz2
ada: Remove dead detection of recursive inlined subprograms
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.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/inline.adb19
1 files changed, 0 insertions, 19 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index f6bed4d..dffd629 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -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.