From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by sourceware.org (Postfix) with ESMTPS id CA4543858D28 for ; Sun, 20 Nov 2022 21:28:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CA4543858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1668979720; bh=D4WlrZR4QQf/s5ERvXMsxQ7S+EltrH3q0/0jDtdzB2U=; h=X-UI-Sender-Class:From:To:Subject:Date; b=mYMHnk71GQ5ZBzZbJrk7UgmSPY1ghfJrSJCrBuuPF58D9TmMQvncj53ngPuJycF1t ewOagZ4f8Fx6vPnDIyRnc6VWDxPLpSP0SzqBgegINIj2VwozeB5Td1IXIZPmdFb31Y s5g74limVL/ubhz8Nn15a/4EpPLlg7oXgnUTMHzBTZjcZ468FTmXUfneHYyDoGv9ol VqwbI0YbqXKRTy3YQtv6Yk3rPnRPRkrZWnvPbvpBzOOWSPu0VMkCC1za9vJcdPah/l w/sODejx1vzKmxGyL7xU+/Sxiyrw5zEHIps+n7GFS51SWM6BRDaWT3mbAT69L25ukz wGACtBRqiwPsw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [93.207.93.70] ([93.207.93.70]) by web-mail.gmx.net (3c-app-gmx-bs70.server.lan [172.19.170.215]) (via HTTP); Sun, 20 Nov 2022 22:28:40 +0100 MIME-Version: 1.0 Message-ID: From: Harald Anlauf To: fortran , sgk@troutmask.apl.washington.edu Subject: typespec in forall and implied-do Content-Type: text/plain; charset=UTF-8 Date: Sun, 20 Nov 2022 22:28:40 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:EGnCf6+v/8V9UMjkkTtH5RotBSUZL37zRUo7RIxSZb2j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QiXodXCXYxMxFeLyZUCgVBsL0q416iOyNBDGKwoTMX6BK8c6g/k18KLCJlYFQWez BvDDp9pC5jJ7M9xfq2XQr4HA== X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Steve, for unknown reasons I cannot reply to your mail on gmane, so trying directly via mailing list. I tried your patch, and it works on the supplied testcases. However, there is a scoping issue for the declaration of the index variable, as can be seen by the following variation: program foo use iso_fortran_env, only : k => real_kinds implicit none integer, parameter :: n = size(k) integer(8) :: i !!$ integer, parameter :: & !!$ & p(n) = [(precision(real(1.,k(i))), integer :: i = 1, n)] integer, parameter :: & & q(n) = [(kind(i), integer(2) :: i = 1, n)] integer, parameter :: & & r(n) = [(storage_size(i), integer(1) :: i = 1, n)] !!$ print *, p print *, q print *, r end program foo After your patch, gfortran prints: 8 8 8 8 64 64 64 64 This suggests that the integer kind is taken from the host decl, which is kind=8, and not the local one (2 or 1). Crayftn (which chokes on your original testcase): 3*2 3*8 This is what I expect. Intel doesn't accept storage_size() here, which is a bug. Commenting the uses of array r, I then get: 2 2 2 At least this agrees with Cray. Can you have another look at this? Thanks so far for you patch! Harald