From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-22.smtpout.orange.fr [80.12.242.22]) by sourceware.org (Postfix) with ESMTPS id 24F7A3858D3C for ; Tue, 4 Jul 2023 09:26:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24F7A3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.16] ([86.215.161.51]) by smtp.orange.fr with ESMTPA id GcIkqLNaujTC5GcIsqPMZQ; Tue, 04 Jul 2023 11:26:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1688462797; bh=4EnvZ510I4FSR86Bd1okDuOEv7FU24HWJGlDIvF4FTM=; h=Date:From:Subject:To:Cc:References:In-Reply-To; b=XoC8qUNRlZCfIKjpv51AbhNPyKmDtRkyddp83hgyL4GRt3+2LmdLkxv1nfRWuTCAp lS2P+0t9q2PD2IjbIbUiAEvNNqP3XHe58+cawZHOdMfuEw+rEuwbG3p8nIFfVh/IQO KPxBAmnUVESv2q84zBsJGu6pBORiWSf6zJ7G4SfDe5iKHl479BlGt97CMmAdvW+WPe ZWW9Ys1qTojxQH2tTDHe0TlnfuXRNcnjGQaQ9oO+97jTTpEDZkV9X1yrTmvhqtnU2f BrQH1GahhE6kgjiKospICMB4+uJW8bXLGdNj7OwJymg6KLF4nZQuql+g7whr/+7hVh E1kpjlaCzXLdA== X-ME-Helo: [192.168.1.16] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Tue, 04 Jul 2023 11:26:36 +0200 X-ME-IP: 86.215.161.51 Message-ID: <503c61f1-1ce3-3e04-a890-ec652d74a693@orange.fr> Date: Tue, 4 Jul 2023 11:26:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 From: Mikael Morin Subject: Re: [PATCH] Fortran: fixes for procedures with ALLOCATABLE,INTENT(OUT) arguments [PR92178] To: sgk@troutmask.apl.washington.edu, Harald Anlauf via Fortran Cc: gcc-patches References: <5a5306ae-0db1-c7e2-e744-a3beced17636@orange.fr> <3adc2904-9876-74d6-2b5d-3cc1896866c3@gmx.de> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Le 04/07/2023 à 01:56, Steve Kargl a écrit : > On Mon, Jul 03, 2023 at 10:49:36PM +0200, Harald Anlauf via Fortran wrote: >> >> Indeed, this is a nice demonstration. >> >> While playing, I was wondering whether the following code is conforming: >> >> program p >> call s ((1)) >> contains >> subroutine s (x) >> integer :: x >> x = 42 >> end subroutine >> end >> >> (It crashes with gfortran, but not with any foreign brand tested). >> > > It's not conforming. '(1)' is an expression and it cannot appear > in a variable definition condition. I am not aware of any numbered > constraint tha would require a Fortran processor to generate an > error. > I think you would be right if X had INTENT(OUT) or INTENT(INOUT) attribute. This is F2023, 15.5.2.4 (no mention of variable definition context here): > If a dummy argument has INTENT (OUT) or INTENT (INOUT), the actual argument shall be definable. However, with unspecified intent, I can't find the rule explicitly forbidding the above example. I'm tempted to say it is conforming.