From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89128 invoked by alias); 4 Feb 2018 11:42:17 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 89119 invoked by uid 89); 4 Feb 2018 11:42:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.1 required=5.0 tests=BAYES_00,SPAM_BODY,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=D*netcologne.de, tkoenig@netcologne.de, tkoenignetcolognede, dimensions X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 04 Feb 2018 11:42:15 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 42A10AAC1; Sun, 4 Feb 2018 11:42:13 +0000 (UTC) Date: Sun, 04 Feb 2018 11:42:00 -0000 User-Agent: K-9 Mail for Android In-Reply-To: <5590e2d6-30f9-bb13-73ad-4ccad4e5e2af@netcologne.de> References: <5f4d68c5-9237-3bde-b175-389cca9150fc@netcologne.de> <5590e2d6-30f9-bb13-73ad-4ccad4e5e2af@netcologne.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Fortran LTO and array descriptors. To: Thomas Koenig ,"fortran@gcc.gnu.org" ,Jakub Jelinek From: Richard Biener Message-ID: <482D915C-A0BA-44AF-96C9-4F4D4E6D192D@suse.de> X-SW-Source: 2018-02/txt/msg00011.txt.bz2 On February 3, 2018 6:17:15 PM GMT+01:00, Thomas Koenig wrote: >I wrote: > >> -=C2=A0 descriptor_dimension dim[r];\ >> +=C2=A0 descriptor_dimension dim[];\ >> =C2=A0} > >> which works well > >... up to a point, there are numerous dtio failures >when regression testing this. > >So, clearly not ready for prime time :-) As far as I remember libgfortran has function signatures with the array des= criptor with the maximum number of dimensions and the frontend generates al= iased function decls with descriptors of the number of dimensions of the ac= tual argument?=20 I believe the solution to the problem is to have the frontend emit only one= declaration matching the library one and passing down pointers to descript= ors that are accessed via the same full dimension type.=20 That can be achieved by either making all array descriptor instances full s= ize or by doing _all_ actual accesses via that type. Like in pseudo C code: Array2 two_dim; ((arrayFullDim *) & two_dim) - >data =3D... ; The middle end supports this well enough by supporting placement new. I und= erstand that really making all descriptors large would be a bigger ABI chan= ge or even non-conforming?=20 Richard.=20 > Thomas