From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 4348E383569F for ; Wed, 1 Jun 2022 08:45:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4348E383569F Received: by mail-ed1-x535.google.com with SMTP id w27so1191138edl.7 for ; Wed, 01 Jun 2022 01:45:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=ZrGXMjOLgrv3LbT/lBOCnYHNlGH/PBXzQN5MQDSrR6o=; b=CKO0SLdv6e5cEa1AguKJ1+dZJ9uS1A2sq8DLOB47JSout2uzmnkpFBqOjktYpspipy e5mqROotOTb01ek4URPozcfMIocOm+M3uEz2FLAD786FaNRJ/froyihMijt0GXrA9oRq In9WH6vyXw7d2wumOH4gOIHWPX8WcOJGo7NRqABxHLNh8kxwZnkcENniAAVrjwlqz3ra GhgTllN8dYjBTPGh+Ck7fqD7cGhDSIKwwhkBkuSNAIN/GtSudkCyqoeaQ4hTENi9VBNQ WG3oOgqE/tstKp8zEukZ3k9XSLcDr0O143sBcNkhpBOJ7F8DJB6kUo7IkeFdhZD1j0bA JfGA== X-Gm-Message-State: AOAM5320pq+OfDlrq6b7C2Vd6UCbnE8Pk92WqZDolwGQ8dmkFsoNxpcO fJw6iNh8i1lU16pn7gZ5zhNVoaB2HWynfw== X-Google-Smtp-Source: ABdhPJyGX3Xh/LQnghZkwSQdTqeY8aduEIwJ4iw5Ib0rm8rzsMnRr6l35hDG4rAWfbXRu7YXPTOoQw== X-Received: by 2002:a05:6402:908:b0:428:11f5:509d with SMTP id g8-20020a056402090800b0042811f5509dmr69099719edz.253.1654073119083; Wed, 01 Jun 2022 01:45:19 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id d22-20020a50fb16000000b0042617ba6389sm613786edq.19.2022.06.01.01.45.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 01:45:18 -0700 (PDT) Date: Wed, 1 Jun 2022 08:45:17 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Julien Bortolussi Subject: [Ada] Bug fix in "=" function of formal doubly linked list Message-ID: <20220601084517.GA1247715@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2022 08:45:22 -0000 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --azLHFNyN32YCQGCU Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" 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; --azLHFNyN32YCQGCU--