]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Further cleanup in inlining machinery
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Aug 2019 09:52:43 +0000 (09:52 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Aug 2019 09:52:43 +0000 (09:52 +0000)
No practical functional changes.

2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* inline.adb (Add_Pending_Instantiation): Use greater-or-equal
in the comparison against the maximum number of instantiations.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274471 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/inline.adb

index 1c869e12359fb00c37edb0ededed91c3c813bbc5..a8de8110586f85f74e3448273586e41a2a356380 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * inline.adb (Add_Pending_Instantiation): Use greater-or-equal
+       in the comparison against the maximum number of instantiations.
+
 2019-08-14  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_aux.adb (Next_Rep_Item): If a node in the rep chain
index 5dbd9a14bd574aaf265eb9fcd2ef024dd94e73ac..15cec5158a3e36cefd76aafa2f2b2b15efdd02f8 100644 (file)
@@ -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 >= 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);