From patchwork Tue Jun 15 10:33:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 55630 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 C8A76B7D6D for ; Tue, 15 Jun 2010 20:34:03 +1000 (EST) Received: (qmail 26568 invoked by alias); 15 Jun 2010 10:34:01 -0000 Received: (qmail 26557 invoked by uid 22791); 15 Jun 2010 10:34:00 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00 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; Tue, 15 Jun 2010 10:33:56 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 51CAC87567 for ; Tue, 15 Jun 2010 12:33:54 +0200 (CEST) Date: Tue, 15 Jun 2010 12:33:53 +0200 From: Martin Jambor To: GCC Patches Cc: Richard Guenther Subject: [PATCH, PR 44464] Add a missing call to release_ssa_name Message-ID: <20100615103353.GB12135@virgil.suse.cz> Mail-Followup-To: GCC Patches , Richard Guenther MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) 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, the patch below fixes PR 44464. IPA-SRA currently leaves behind a danglig reference to old PARAM_DECLs in dead but still existing SSA_NAMEs which means we can bump into it unexpectedly later on like in the bug. Releasing the SSA_NAMEs appropriately deals with these problems. Bootstrapped and tested on x86-64-linux without any problems. OK for trunk and later on for the 4.5 branch too? Thanks, Martin 2010-06-14 Martin Jambor PR lto/44464 * tree-sra.c (replace_removed_params_ssa_names): Call release_ssa_name on the newly dead SSA name. Index: mine/gcc/tree-sra.c =================================================================== --- mine.orig/gcc/tree-sra.c +++ mine/gcc/tree-sra.c @@ -3883,6 +3883,7 @@ replace_removed_params_ssa_names (gimple gimple_phi_set_result (stmt, name); replace_uses_by (lhs, name); + release_ssa_name (lhs); return true; }