From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43065 invoked by alias); 28 Sep 2018 05:12:40 -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 42393 invoked by uid 89); 28 Sep 2018 05:12:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,SPAM_BODY,SPF_PASS autolearn=no version=3.3.2 spammy=Von, H*i:sk:f48efd1, H*f:sk:f48efd1 X-HELO: postout2.mail.lrz.de Received: from postout2.mail.lrz.de (HELO postout2.mail.lrz.de) (129.187.255.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Sep 2018 05:12:36 +0000 Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by postout2.mail.lrz.de (Postfix) with ESMTP id 42M0DL2MDWzyd6; Fri, 28 Sep 2018 07:12:34 +0200 (CEST) Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=lrz.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lrz.de; h= mime-version:content-transfer-encoding:content-type:content-type :content-language:accept-language:in-reply-to:references :message-id:date:date:subject:subject:from:from:received :received:received:received; s=postout; t=1538111553; bh=vv0fNVL vxjb6l/gCbzhYMMdMGwkD7gDt21C5SkeDmzw=; b=mDEKonX/b7Oc1fYfo0eMctb mnHTEthmzniBNSNyt6EpHs3WzzQLGuK2G5Fr1r04JWGc8ZZoQr7QgvSJ/b3HSgK1 7J/KEjqi9LS3YcxvUt4FJsuYJFmIGoaFsAr4H4FFyPiW9hCg90ZdQbJoruTccq6/ 1eSACBKsbDRjv3iJBLFEKTbxzmm/tTrl4uje0S3OtIpDy2Uv33bz/SkMmAN+Y9A1 wZcD5KQ3l/DPtEVKNJ/3HVg2eQ0eYNRfSZPIa+Mr0jPKtyRQCrdwTvOoPZBfJ3TI dc0egMGKIUojrz97evXtTliUL7BHMutbWnySWmBqymstrrV5c1Plr/l/WaJ6onA= = X-Spam-Score: -2.874 Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id Vun0X9pbYmuL; Fri, 28 Sep 2018 07:12:33 +0200 (CEST) Received: from BADWLRZ-SWMBX06.ads.mwn.de (BADWLRZ-SWMBX06.ads.mwn.de [10.156.54.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX06", Issuer "BADWLRZ-SWMBX06" (not verified)) by postout2.mail.lrz.de (Postfix) with ESMTPS id 42M0DK5ChMzyd5; Fri, 28 Sep 2018 07:12:33 +0200 (CEST) Received: from BADWLRZ-SWMBX05.ads.mwn.de (2001:4ca0:0:108::161) by BADWLRZ-SWMBX06.ads.mwn.de (2001:4ca0:0:108::162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1531.3; Fri, 28 Sep 2018 07:12:33 +0200 Received: from BADWLRZ-SWMBX05.ads.mwn.de ([fe80::4095:4fb3:50be:d2bd]) by BADWLRZ-SWMBX05.ads.mwn.de ([fe80::4095:4fb3:50be:d2bd%12]) with mapi id 15.01.1531.004; Fri, 28 Sep 2018 07:12:33 +0200 From: "Bader, Reinhold" To: Thomas Koenig , "fortran@gcc.gnu.org" Subject: AW: [patch,wip] warn on noncontiguous pointers Date: Fri, 28 Sep 2018 05:12:00 -0000 Message-ID: <2e72ca261ac34d0b839c112f8cee3600@lrz.de> References: <6c7d4e6ddec64bd8a326a95591b2bb47@lrz.de> In-Reply-To: X-MS-Exchange-Organization-AuthAs: Internal X-MS-Exchange-Organization-AuthMechanism: 04 X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX05.ads.mwn.de Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2018-09/txt/msg00217.txt.bz2 Hi Thomas,=20 > -----Urspr=FCngliche Nachricht----- > Von: Thomas Koenig > Gesendet: Donnerstag, 27. September 2018 19:24 > An: Bader, Reinhold ; fortran@gcc.gnu.org > Betreff: Re: [patch,wip] warn on noncontiguous pointers >=20 > Hi Reinhold, >=20 > >> If we go down the list, we see that fptr1(4:) is not contiguous; it > >> is not an array (it is a pointer), so (4) also does not apply. > > I don't agree with this conclusion. First, the array and pointer > > properties are not mutually exclusive (they are conveyed by specifying > > the DIMENSION and POINTER attribute, independently). >=20 > Can you maybe elaborate a bit more? >=20 > I see that you can associate a pointer with a target (6.7.1.4), which of = course > can be an array. But I have not found anything in the standard that says = that a > pointer to an array is an array. OK. Looking at 5.3.8.1 (Fortran 2008 for the sake of this discussion), we h= ave that an object that has the DIMENSION attribute is an array. array-spec includes= deferred-shape-spec-list,=20 so any object declared with deferred shape is an array.=20 5.3.8.4 then says C532 An array with the POINTER or ALLOCATABLE attribute shall have an array= -spec that is a deferred-shape-spec-list. and then has further text to say at what point things like SHAPE or SIZE of= such an object become defined. It can't get any clearer than that.=20 Cheers Reinhold >=20 > Regards >=20 > Thomas