aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/inline.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-14 09:52:48 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-14 09:52:48 +0000
commitf0539a7914cba3b7de76665a74edb90e30f2dbc9 (patch)
treec494f371022ac3bcd160707ab4b54c0c83e5fc83 /gcc/ada/inline.adb
parent0cc1d9ad98fdabe6c577de1a83c4e12821f0c333 (diff)
downloadgcc-f0539a7914cba3b7de76665a74edb90e30f2dbc9.zip
gcc-f0539a7914cba3b7de76665a74edb90e30f2dbc9.tar.gz
gcc-f0539a7914cba3b7de76665a74edb90e30f2dbc9.tar.bz2
[Ada] Further cleanup in inlining machinery
This is visible if you pass a very small number by means of -gnateinn. 2019-08-14 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * inline.adb (Add_Pending_Instantiation): Fix off-by-one error in the comparison against the maximum number of instantiations. From-SVN: r274472
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r--gcc/ada/inline.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 15cec51..84ad1ab 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -794,7 +794,7 @@ package body Inline is
-- Here is a defense against a ludicrous number of instantiations
-- caused by a circular set of instantiation attempts.
- if Pending_Instantiations.Last >= Maximum_Instantiations then
+ if Pending_Instantiations.Last + 1 >= Maximum_Instantiations then
Error_Msg_Uint_1 := UI_From_Int (Maximum_Instantiations);
Error_Msg_N ("too many instantiations, exceeds max of^", Inst);
Error_Msg_N ("\limit can be changed using -gnateinn switch", Inst);