From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33620 invoked by alias); 11 Oct 2018 14:39:46 -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 33480 invoked by uid 89); 11 Oct 2018 14:39:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=3.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GARBLED_SUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*f:sk:c0ed507, H*f:sk:4c9f65b, H*f:sk:oGjak1j, H*f:CAGkQGiKPgo81h6 X-HELO: mail-yb1-f173.google.com Received: from mail-yb1-f173.google.com (HELO mail-yb1-f173.google.com) (209.85.219.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Oct 2018 14:39:43 +0000 Received: by mail-yb1-f173.google.com with SMTP id w80-v6so3681894ybe.10; Thu, 11 Oct 2018 07:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aa4lYvx54KQe29XNW6tnl4jf/EcIbuIFnjEaFfso10g=; b=Bubn7qUsizVk0WEt0EHwqL7j72gSHatp8ciCvKlxXnkFX8Rtsn2WDUqPRI8btXwaqM pk0tyeu1o6rhv0a7TTuDmzvqlAedQh1mAnD52EGv+0VhxGpFFtR/hTi8uV1YniIe3Y7C arf6TNdZQo6LLU71M/ZlINGVA+x40WEsJkGebLsK7zcf7GD4vIHl0Lt3HYoOIX66nOkf EsHIFn8xi1rRtyZNp1UNQVKprnTzdm7cHh+tIC1WUl7zZAwnPk/7aSIlu9MjLtEqVmfq Rko58QeKDso9po2p2zVN5i/FszOQLrpgX6fFde5AaN+0VgyCvo5wHZnDIyUw5sAqYxgh tssw== MIME-Version: 1.0 References: <4c9f65bf-4878-baa0-f3e5-d3943e4eb985@netcologne.de> In-Reply-To: From: Paul Richard Thomas Date: Thu, 11 Oct 2018 14:39:00 -0000 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BPatch=2C_Fortran=5D_PR_fortran=2F83522_=E2=80=93_reject_arr?= =?UTF-8?Q?ay=2Dvalued_substrings?= To: David Edelsohn Cc: Thomas Koenig , "fortran@gcc.gnu.org" , gcc-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00047.txt.bz2 The section from the standard in comment #2 is being misinterpreted. R609 and R610 concern substrings in the context of section 6.4, which concerns SCALARS! Section 6.5 concerns arrays and you will find there: R618 array-section is data-ref [ ( substring-range ) ] or complex-part-designator C624 (R618) Exactly one part-ref shall have nonzero rank, and either the final part-ref shall have a section- subscript-list with nonzero rank, another part-ref shall have nonzero rank, or the complex-part-designator shall be an array. Further lines appear later in which in which substrings of array sections are explicitly mentioned: eg. If a substring-range appears in an array-section, each element is the designated substring of the corresponding element of the array section. The value of a subscript in an array element shall be within the bounds for its dimension. Thus the patch is contrary to the standard and must be removed as soon as possible. Paul On Thu, 11 Oct 2018 at 15:20, David Edelsohn wrote: > > Another data point: I tried some of the testcases with IBM XL Fortran > compiler and it didn't complain or fail. I have no idea if this > behavior is an IBM extension or how other Fortran compilers behave. > > GNU Fortran probably should be compatible with other Fortran > compilers, even if the behavior is not pedantically conformant with > the standard. > > Thanks, David > > On Wed, Oct 10, 2018 at 7:12 PM Paul Richard Thomas > wrote: > > > > This seems to have caused errors in the testsuite. I guess that the > > problem is that the testcases are invalid :-( > > > > From David Edelsohn: > > Error: Substring reference of nonscalar not permitted at (1) > > > > arrayio_11.f90 > > arrayio_12.f90 > > associate_23.f90 > > data_char_1.f90 > > deferred_character_2.f90 > > deferred_character_22.f90 > > deferred_character_23.f90 > > deferred_character_8.f90 > > deferred_type_component_3.f90 > > > > Cheers > > > > Paul > > > > On Mon, 8 Oct 2018 at 23:16, Thomas Koenig wrote: > > > > > > Hi Tobias, > > > > > > nice to hear from you again! > > > > > > > Build and regtested on x86_64-linux. > > > > OK for the trunk? > > > > > > OK. Thanks for the patch! > > > > > > Regards > > > > > > Thomas > > > > > > > > -- > > "If you can't explain it simply, you don't understand it well enough" > > - Albert Einstein -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein