From patchwork Wed May 30 21:12:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cary Coutant X-Patchwork-Id: 162084 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 A0B89B7077 for ; Thu, 31 May 2012 07:13:03 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1339017184; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:To:Subject:Message-Id:Date: From:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=65Vksf/ u7+Oo7K2tTpS0NnLwzyE=; b=nZmOjcTbXatBeA/wjQP3+VDnvfp3vfOujD0piPt q9XKPFSNR1v5kfSOVBMpbgJgcF/9rPawyd4hRBxuUsu4bLH88ZRYOV5Ulz5VZjfo 6+bXuS79Avh/kXuLRDVDtflptp7TB9cJTOEOZa9+fDx1lq/+Nu4mrs7HxtVQ9n/x z9yo= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:Received:Received:To:Subject:Message-Id:Date:From:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=QOUI/8B+IQ+hIGmtonG3MS7185B6dCHxnGQFSI5Ma47e1HncIXkmHiGg18oAjA QIHGJ599X6uv5B/+g5LmHd1JyJ+gXDk6a4afTbmRC42fMIcWtzQVn3g3MK6VDZuo QYgfXMcJ3tmJeqktI6xiuRFw0xVWZXe7qfbi2SvVs1Pvc=; Received: (qmail 12514 invoked by alias); 30 May 2012 21:12:57 -0000 Received: (qmail 12505 invoked by uid 22791); 30 May 2012 21:12:53 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-bk0-f73.google.com (HELO mail-bk0-f73.google.com) (209.85.214.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 May 2012 21:12:39 +0000 Received: by bkcjc3 with SMTP id jc3so10661bkc.2 for ; Wed, 30 May 2012 14:12:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=to:subject:message-id:date:from:x-gm-message-state; bh=FlgFRy0pNKxU3w0D1LOIxYLZGscUhRWjtZiC0LEfch0=; b=n4WdBP5xjEUUIf8u3sxGkwJW/RtfomTdjzayZOq1XawiB6cPsEOlf+4ggxlfaeAva0 80dzwA5HOh708pRRXVWdfne55QkS1VbDrbVF4LkMqq0iHlUnhNKpr4OesTf8kN94lbqH b8g8EfAbadtTlcmVHiFs2Y7kJJ9KaWLk8Akf1KKAlORRwUT4Izz6Se/vV+8ZXubCGd0A L2v5R2XcCX7zG7hQLE9qLktGGUpGWWFvrnpc5nl7CudeIoU0auYctNxNGzQWuqvlA0Sq KPr5EVJFf9x0AMkb1HWBqBXOmCc6uzZS8Ee6tUGvABNuHjIJbANRYBRwrBDQjxcz9sQN DMlg== Received: by 10.14.99.208 with SMTP id x56mr4448887eef.1.1338412357996; Wed, 30 May 2012 14:12:37 -0700 (PDT) Received: by 10.14.99.208 with SMTP id x56mr4448883eef.1.1338412357904; Wed, 30 May 2012 14:12:37 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id d52si785162eei.1.2012.05.30.14.12.37 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 30 May 2012 14:12:37 -0700 (PDT) Received: from ccoutant.mtv.corp.google.com (ccoutant.mtv.corp.google.com [172.18.110.42]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id B102F5C0060; Wed, 30 May 2012 14:12:37 -0700 (PDT) Received: by ccoutant.mtv.corp.google.com (Postfix, from userid 62097) id 0241AE14E8; Wed, 30 May 2012 14:12:36 -0700 (PDT) To: reply@codereview.appspotmail.com, saugustine@google.com, gcc-patches@gcc.gnu.org Subject: [google/gcc-4_6] Fix -gfission issue in index_location_lists (issue6248072) Message-Id: <20120530211237.0241AE14E8@ccoutant.mtv.corp.google.com> Date: Wed, 30 May 2012 14:12:36 -0700 (PDT) From: ccoutant@google.com (Cary Coutant) X-Gm-Message-State: ALoCoQmgjlPW9xcbrSsKu8c0wTWX3/ahrAwZABzS0brJ5tiq74oQ3nGiUxnYBLmo2B0DsHyHJyPVP19riHrtvXTddZGES5lQpURYkTKIOyBK65Brm5vGsf3Dp++Gr9OxtFZF4DdLAld/B52VLs1F16DT0LAHNljE9w== 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 This patch is for the google/gcc-4_6 branch. It fixes an issue that causes the .debug_addr section to be twice as big as it should be. Tested on x86_64 and ran validate_failures.py. Also tested by building an internal application and verifying correct behavior. 2012-05-30 Cary Coutant * gcc/dwarf2out.c (index_location_lists): Don't index location lists that have already been indexed. --- This patch is available for review at http://codereview.appspot.com/6248072 Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 187983) +++ gcc/dwarf2out.c (working copy) @@ -24269,8 +24269,10 @@ index_location_lists (dw_die_ref die) { dw_attr_node attr; - /* Don't index an entry that won't be output. */ - if (strcmp (curr->begin, curr->end) == 0) + /* Don't index an entry that has already been indexed + or won't be output. */ + if (curr->begin_index != -1U + || strcmp (curr->begin, curr->end) == 0) continue; attr.dw_attr = DW_AT_location;