public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Bug fix in "=" function of formal doubly linked list
@ 2022-06-01  8:45 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-06-01  8:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: Julien Bortolussi

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

Correction of a typo regarding indexes.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* libgnat/a-cfdlli.adb ("="): Make the function properly loop
	over the right list.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 472 bytes --]

diff --git a/gcc/ada/libgnat/a-cfdlli.adb b/gcc/ada/libgnat/a-cfdlli.adb
--- a/gcc/ada/libgnat/a-cfdlli.adb
+++ b/gcc/ada/libgnat/a-cfdlli.adb
@@ -68,9 +68,9 @@ is
       end if;
 
       LI := Left.First;
-      RI := Left.First;
+      RI := Right.First;
       while LI /= 0 loop
-         if Left.Nodes (LI).Element /= Right.Nodes (LI).Element then
+         if Left.Nodes (LI).Element /= Right.Nodes (RI).Element then
             return False;
          end if;
 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-01  8:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01  8:45 [Ada] Bug fix in "=" function of formal doubly linked list Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).