From patchwork Wed Jun 30 16:08:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Matz X-Patchwork-Id: 57429 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 571EDB6F06 for ; Thu, 1 Jul 2010 02:09:06 +1000 (EST) Received: (qmail 5003 invoked by alias); 30 Jun 2010 16:09:03 -0000 Received: (qmail 4995 invoked by uid 22791); 30 Jun 2010 16:09:02 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jun 2010 16:08:57 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 3F0A079727; Wed, 30 Jun 2010 18:08:55 +0200 (CEST) Date: Wed, 30 Jun 2010 18:08:54 +0200 (CEST) From: Michael Matz To: gcc-patches@gcc.gnu.org Cc: Nathan Froyd Subject: [obvious] Fix fallout from cp/repo.c change Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes 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 Hi, I wonder how this could have tested okay, I reliably get segfaults for the repo testcases as 'val' will be NULL after the vector got iterated through. I've committed this obvious in r161612. Ciao, Michael. Index: repo.c =================================================================== --- repo.c (revision 161611) +++ repo.c (working copy) @@ -269,7 +269,7 @@ finish_repo (void) for (ix = VEC_length (tree, pending_repo) - 1; VEC_iterate (tree, pending_repo, ix, val); - ix--); + ix--) { tree name = DECL_ASSEMBLER_NAME (val); char type = IDENTIFIER_REPO_CHOSEN (name) ? 'C' : 'O';