From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id AED663857C53; Mon, 21 Sep 2020 08:04:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AED663857C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=none smtp.mailfrom=hubicka@kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 8E0802829B5; Mon, 21 Sep 2020 10:04:47 +0200 (CEST) Date: Mon, 21 Sep 2020 10:04:47 +0200 From: Jan Hubicka To: Richard Biener Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: New modref/ipa_modref optimization passes Message-ID: <20200921080447.GE6758@kam.mff.cuni.cz> References: <157394261677.27454.2367573047582814412@a285.localdomain> <20200919223255.GA69342@kam.mff.cuni.cz> <20200920061551.GA29500@kam.mff.cuni.cz> <20200921074752.GD91738@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 08:04:51 -0000 > > > > The problem is: > > > > alsize (struct array15_unknown & restrict a) > > { > > ... > > _2 = *a_13(D).dtype.rank; > > _3 = (integer(kind=8)) _2; > > ... > > } > > } > > and in main: > > > > struct array02_integer(kind=4) am; > > : > > MEM [(struct dtype_type *)&am + 24B] = {}; > > am.dtype.elem_len = 4; > > am.dtype.rank = 2; > > am.dtype.type = 1; > > ... > > _52 = alsize (&am); > > > > Here array15_unknown and array02_integer are different structures with > > different canonical types and thus we end up disambiguating the accesses > > via base alias sets. > > > > My understanding is that this _unknown array descriptor is supposed to > > be universal and work with all kinds of arrays. > > But the FE builds a new descriptor for each individual call and thus > should build a universal descriptor for a call to an universal > descriptor argument. I see, so you would expect call to alsize to initialize things in array15_unkonwn type? That would work too. Honza