From patchwork Tue Mar 5 11:51:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 224989 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 085752C033B for ; Tue, 5 Mar 2013 22:51:29 +1100 (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=1363089090; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Date: From:To:Cc:Subject:Message-ID:User-Agent:MIME-Version: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=O+Eqnbj y++HgS3Yu2d6KcJ8hUlI=; b=yK041WPwaOEsSEA1gHocpWoDCX6U2fkowVIGZDb 8Q4zZYSHrJAGEacKBl3fAb2rxnYHEeUT4nJpoWCgHKGH9J64Te6vs8m1bd1maGBU 406sii4081RiN2H/PN5l0mIBfKYzTz6cVyIihFSBZHD/UUbBYOQfnFkgtrycik+J TRlY= 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:Date:From:To:Cc:Subject:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=FGRY0caXKZMeyYkNpucNPstLiTEKqpliu3VxU5VhBfiCZ6+w+BgDzpC2cVzO4+ fhz1Kos61qVW2pnAtD6pF/kK4GCU32iIK9COpLc+U+S1eY/KElLDumZVx9ZJHQNJ lXWl/nhFMcQootK5l4eLK7LOiftKYOJf421IU18Q+SPfs=; Received: (qmail 13744 invoked by alias); 5 Mar 2013 11:51:22 -0000 Received: (qmail 13736 invoked by uid 22791); 5 Mar 2013 11:51:21 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, 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; Tue, 05 Mar 2013 11:51:10 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CB8B0A520E; Tue, 5 Mar 2013 12:51:09 +0100 (CET) Date: Tue, 5 Mar 2013 12:51:09 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek Subject: [PATCH] Fix PR56521 Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 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 VN now inserts all sorts of calls into the references hashtable, not only those which produce a value. This results in missing initializations of ->value_id which eventually PRE ends up accessing. The following fixes that. Bootstrap and regtest pending on x86_64-unknown-linux-gnu. Richard. 2013-03-05 Richard Biener * tree-ssa-sccvn.c (set_value_id_for_result): For a NULL result set a new value-id. Index: gcc/tree-ssa-sccvn.c =================================================================== --- gcc/tree-ssa-sccvn.c (revision 196451) +++ gcc/tree-ssa-sccvn.c (working copy) @@ -3954,7 +3962,7 @@ free_scc_vn (void) XDELETE (optimistic_info); } -/* Set *ID if we computed something useful in RESULT. */ +/* Set *ID according to RESULT. */ static void set_value_id_for_result (tree result, unsigned int *id) @@ -3966,6 +3974,8 @@ set_value_id_for_result (tree result, un else if (is_gimple_min_invariant (result)) *id = get_or_alloc_constant_value_id (result); } + else + *id = get_next_value_id (); } /* Set the value ids in the valid hash tables. */