From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35418 invoked by alias); 13 Jun 2019 20:55:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 35410 invoked by uid 89); 13 Jun 2019 20:55:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jun 2019 20:55:14 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 8F02D2823A7; Thu, 13 Jun 2019 22:55:12 +0200 (CEST) Date: Thu, 13 Jun 2019 20:55:00 -0000 From: Jan Hubicka To: Rainer Orth Cc: Christophe Lyon , Richard Biener , gcc Patches , d@dcepelik.cz Subject: Re: indirect_ref_may_alias_decl_p fix Message-ID: <20190613205512.kkpsc6oicmoeovmt@kam.mff.cuni.cz> References: <20190613120550.7wtzpieeszazjn7i@kam.mff.cuni.cz> <20190613122928.arp65f726mbnsxyz@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2019-06/txt/msg00800.txt.bz2 Hi, actually since Rainer's testcase has TARGET_MEM_REF I think the problem may be due to fact that we now can get TARGET_MEM_REF ofsetting the array housed in decl while previously we gave up on types mismatch. Does the following help? Index: tree-ssa-alias.c =================================================================== --- tree-ssa-alias.c (revision 272265) +++ tree-ssa-alias.c (working copy) @@ -1393,8 +1393,10 @@ But avoid treating variable length arrays as "objects", instead assume they can overlap by an exact multiple of their element size. See gcc.dg/torture/alias-2.c. */ - if ((TREE_CODE (base1) != TARGET_MEM_REF - || (!TMR_INDEX (base1) && !TMR_INDEX2 (base1))) + if (((TREE_CODE (base1) != TARGET_MEM_REF + || (!TMR_INDEX (base1) && !TMR_INDEX2 (base1))) + && (TREE_CODE (dbase2) != TARGET_MEM_REF + || (!TMR_INDEX (dbase2) && !TMR_INDEX2 (dbase2)))) && same_type_for_tbaa (TREE_TYPE (base1), TREE_TYPE (dbase2)) == 1 && (TREE_CODE (TREE_TYPE (base1)) != ARRAY_TYPE || (TYPE_SIZE (TREE_TYPE (base1))