From patchwork Mon Aug 29 14:04:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 112059 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id A0D8FB6F8B for ; Tue, 30 Aug 2011 00:05:06 +1000 (EST) Received: (qmail 3048 invoked by alias); 29 Aug 2011 14:05:01 -0000 Received: (qmail 3038 invoked by uid 22791); 29 Aug 2011 14:04:59 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Aug 2011 14:04:46 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 681F42BAE23; Mon, 29 Aug 2011 10:04:45 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dHdcPLZFMeBZ; Mon, 29 Aug 2011 10:04:45 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 3E7582BAE1F; Mon, 29 Aug 2011 10:04:45 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id 3367292A55; Mon, 29 Aug 2011 10:04:45 -0400 (EDT) Date: Mon, 29 Aug 2011 10:04:45 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Matthew Heaney Subject: [Ada] Navigate to next node in bucket when iterating Message-ID: <20110829140443.GA24529@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org There are two overloadings of Next. One is a selector function to return the next node in the current bucket, the other navigates to the next element in the container. The implementation of Generic_Iteration needs to call the former, as it interrogates the items in each bucket, before moving on the next bucket. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Matthew Heaney * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next. Index: a-chtgbo.adb =================================================================== --- a-chtgbo.adb (revision 178228) +++ a-chtgbo.adb (working copy) @@ -350,7 +350,7 @@ Node := HT.Buckets (Indx); while Node /= 0 loop Process (Node); - Node := Next (HT, Node); + Node := Next (HT.Nodes (Node)); end loop; end loop; end Generic_Iteration;