From: Julien Bortolussi Date: Fri, 6 May 2022 14:48:31 +0000 (+0200) Subject: [Ada] Bug fix in "=" function of formal doubly linked list X-Git-Tag: basepoints/gcc-14~6308 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce0bbf28fb11b75ebc7d0140ccc38857c03303d9;p=thirdparty%2Fgcc.git [Ada] Bug fix in "=" function of formal doubly linked list Correction of a typo regarding indexes. gcc/ada/ * libgnat/a-cfdlli.adb ("="): Make the function properly loop over the right list. --- diff --git a/gcc/ada/libgnat/a-cfdlli.adb b/gcc/ada/libgnat/a-cfdlli.adb index 383d031d715..7b23ad79232 100644 --- 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;