From patchwork Thu Jan 15 15:45:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 429490 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9B4271400EA for ; Fri, 16 Jan 2015 02:45:44 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=h6DAuZqL0pMuH+LhXsbK2oFw4wmLm/T0sN5uqgrFJgXLPz 0PtwWxfYVDUmM/pKC9ymnvQMKSiyWnT2N9qkc1lPkEPnvoZfQB1ZcC5AVdRdt8IM 0E1dHk7f6kX57Npwq4v3H7o/eDb1+h0Tjp8lFzdHCOZ/dwFxQhkVJwKX4PhRY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=SRnAELviIWt6nbT3z64I5srbZtI=; b=m9CqqTl/INMZYAjD4JVm HzYHKZWsxy5zRZPndtENNd1U1k48Kclqbd/DswXVwOFzOP+Ve8ZO0kV9rmSIKZDP TNsFO4QVRPPUopa0cxuni78xvH1oiK8uQvguUl3cHZVhcqvK0s+yWd5S3sYpkLgq sfDc8DlpjbVjvfkYIejIZtE= Received: (qmail 6568 invoked by alias); 15 Jan 2015 15:45:37 -0000 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 Received: (qmail 6543 invoked by uid 89); 15 Jan 2015 15:45:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 15 Jan 2015 15:45:31 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 07CC5ADA4 for ; Thu, 15 Jan 2015 15:45:27 +0000 (UTC) Message-ID: <54B7E096.6020002@suse.cz> Date: Thu, 15 Jan 2015 16:45:26 +0100 From: =?UTF-8?B?TWFydGluIExpxaFrYQ==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH 4.8/4.9] Backport of PR lto/63704 X-IsSubscribed: yes Hello. Following patch is a backport of PR lto/63704 for GCC 4.8 and 4.9 branches. Richi preapproved me the patch and I've run regtests on x86_64-linux-pc. I'm going to install the patch. Thanks, Martin diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 779fef7..ab916b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-01-15 Richard Biener + Martin Liska + + PR middle-end/63704 + * alias.c (mems_in_disjoint_alias_sets_p): Remove assert + and instead return false when !fstrict-aliasing. + 2014-10-21 Jakub Jelinek PR tree-optimization/63563 diff --git a/gcc/alias.c b/gcc/alias.c index 434ae7a..79a3560 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -383,17 +383,9 @@ get_alias_set_entry (alias_set_type alias_set) static inline int mems_in_disjoint_alias_sets_p (const_rtx mem1, const_rtx mem2) { -/* Perform a basic sanity check. Namely, that there are no alias sets - if we're not using strict aliasing. This helps to catch bugs - whereby someone uses PUT_CODE, but doesn't clear MEM_ALIAS_SET, or - where a MEM is allocated in some way other than by the use of - gen_rtx_MEM, and the MEM_ALIAS_SET is not cleared. If we begin to - use alias sets to indicate that spilled registers cannot alias each - other, we might need to remove this check. */ - gcc_assert (flag_strict_aliasing - || (!MEM_ALIAS_SET (mem1) && !MEM_ALIAS_SET (mem2))); - - return ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1), MEM_ALIAS_SET (mem2)); + return (flag_strict_aliasing + && ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1), + MEM_ALIAS_SET (mem2))); } /* Insert the NODE into the splay tree given by DATA. Used by