Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The idea of male and female are universal constants. -- Kirk, "Metamorphosis", stardate 3219.8


devel / comp.lang.fortran / What does this do?

SubjectAuthor
* What does this do?Robert Corbett
+- Re: What does this do?Robert Corbett
+* Re: What does this do?Thomas Koenig
|`* Re: What does this do?Robert Corbett
| `* Re: What does this do?FortranFan
|  `* Re: What does this do?Robert Corbett
|   `* Re: What does this do?John
|    `* Re: What does this do?Ron Shepard
|     +* Re: What does this do?John
|     |`* Re: What does this do?gah4
|     | `- Re: What does this do?Robin Vowels
|     `- Re: What does this do?gah4
+- Re: What does this do?FortranFan
`* Re: What does this do?Steve Lionel
 `- Re: What does this do?Robert Corbett

1
What does this do?

<f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2551&group=comp.lang.fortran#2551

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ae9:e702:0:b0:6b5:9c37:8b23 with SMTP id m2-20020ae9e702000000b006b59c378b23mr14819257qka.511.1658050193599;
Sun, 17 Jul 2022 02:29:53 -0700 (PDT)
X-Received: by 2002:a0d:c547:0:b0:31b:d6fa:c05c with SMTP id
h68-20020a0dc547000000b0031bd6fac05cmr24599132ywd.105.1658050193373; Sun, 17
Jul 2022 02:29:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 17 Jul 2022 02:29:53 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2600:387:f:4816:0:0:0:2;
posting-account=r3eTlQoAAAABvPStTQdpPnri4DjaXXqT
NNTP-Posting-Host: 2600:387:f:4816:0:0:0:2
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
Subject: What does this do?
From: robertpaulcorbett@gmail.com (Robert Corbett)
Injection-Date: Sun, 17 Jul 2022 09:29:53 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: Robert Corbett - Sun, 17 Jul 2022 09:29 UTC

--------------------------------prog.f---------------------------------
PROGRAM MAIN
INTEGER X
X = 2
BLOCK
X = X + 1
DATA X/0/
PRINT *, X
END BLOCK
PRINT *, X
END
-----------------------------------------------------------------------

I would like to know what results various
compilers produce for the program shown
above. The compilers need to be of recent
vintage as the BLOCK construct was new
in Fortran 2008.

Re: What does this do?

<4da480f3-0f82-4b87-b4c5-e5bc8a4f62f6n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2552&group=comp.lang.fortran#2552

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5703:0:b0:31e:9241:c019 with SMTP id 3-20020ac85703000000b0031e9241c019mr17895471qtw.416.1658050535900;
Sun, 17 Jul 2022 02:35:35 -0700 (PDT)
X-Received: by 2002:a05:6902:724:b0:66e:8c2b:ef78 with SMTP id
l4-20020a056902072400b0066e8c2bef78mr23712759ybt.313.1658050535688; Sun, 17
Jul 2022 02:35:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 17 Jul 2022 02:35:35 -0700 (PDT)
In-Reply-To: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:387:f:4816:0:0:0:2;
posting-account=r3eTlQoAAAABvPStTQdpPnri4DjaXXqT
NNTP-Posting-Host: 2600:387:f:4816:0:0:0:2
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4da480f3-0f82-4b87-b4c5-e5bc8a4f62f6n@googlegroups.com>
Subject: Re: What does this do?
From: robertpaulcorbett@gmail.com (Robert Corbett)
Injection-Date: Sun, 17 Jul 2022 09:35:35 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 3
 by: Robert Corbett - Sun, 17 Jul 2022 09:35 UTC

I am sorry, but my news agent removed all leading
blanks from the program after I hit post. For fixed
form compilation, add six blanks to the start of
each line.

Re: What does this do?

<tb0mu6$2tj$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2553&group=comp.lang.fortran#2553

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-3a42-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: What does this do?
Date: Sun, 17 Jul 2022 10:05:58 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tb0mu6$2tj$1@newsreader4.netcologne.de>
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 17 Jul 2022 10:05:58 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-3a42-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:3a42:0:7285:c2ff:fe6c:992d";
logging-data="2995"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sun, 17 Jul 2022 10:05 UTC

Robert Corbett <robertpaulcorbett@gmail.com> schrieb:
> --------------------------------prog.f---------------------------------
> PROGRAM MAIN
> INTEGER X
> X = 2
> BLOCK
> X = X + 1
> DATA X/0/
> PRINT *, X
> END BLOCK
> PRINT *, X
> END
> -----------------------------------------------------------------------
>
> I would like to know what results various
> compilers produce for the program shown
> above.

Both gfortran and nagfor reject it:

$ gfortran x.f
x.f:6:16:

6 | DATA X/0/
| 1
Error: Host associated variable ‘x’ may not be in the DATA statement at (1)
$ nagfor x.f
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7101
Error: x.f, line 6: Invalid redeclaration of host symbol X
detected at DATA@X
[NAG Fortran Compiler pass 1 error termination, 1 error]

Re: What does this do?

<51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2556&group=comp.lang.fortran#2556

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:68c5:0:b0:6b5:e9ce:183c with SMTP id d188-20020a3768c5000000b006b5e9ce183cmr154029qkc.651.1658054733695;
Sun, 17 Jul 2022 03:45:33 -0700 (PDT)
X-Received: by 2002:a25:f606:0:b0:66e:3700:41bc with SMTP id
t6-20020a25f606000000b0066e370041bcmr23209740ybd.238.1658054733502; Sun, 17
Jul 2022 03:45:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 17 Jul 2022 03:45:33 -0700 (PDT)
In-Reply-To: <tb0mu6$2tj$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=108.74.162.237; posting-account=r3eTlQoAAAABvPStTQdpPnri4DjaXXqT
NNTP-Posting-Host: 108.74.162.237
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com> <tb0mu6$2tj$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
Subject: Re: What does this do?
From: robertpaulcorbett@gmail.com (Robert Corbett)
Injection-Date: Sun, 17 Jul 2022 10:45:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 52
 by: Robert Corbett - Sun, 17 Jul 2022 10:45 UTC

Thank you.

The reason gfortran gives for rejecting the program
is misleading. The 'x' in the BLOCK construct is not
host-associated with the 'x' in the scoping unit of
MAIN. The BLOCK construct is in the inclusive
scope of MAIN, and therefore, the 'x' in the BLOCK
construct is either in the scope of the 'x' in the scoping
unit of MAIN or 'x' identifies separate and
unassociated entities in the two contexts.

The NAG compiler is treating the DATA statement as
an explicit declaration. There is something missing
in the standard, and so the program is not standard
conforming because the standard does not
establish a meaning for the program. That hole in
the standard is what prompted me to ask the
question.

On Sunday, July 17, 2022 at 3:06:02 AM UTC-7, Thomas Koenig wrote:
> Robert Corbett <robertpa...@gmail.com> schrieb:
> > --------------------------------prog.f---------------------------------
> > PROGRAM MAIN
> > INTEGER X
> > X = 2
> > BLOCK
> > X = X + 1
> > DATA X/0/
> > PRINT *, X
> > END BLOCK
> > PRINT *, X
> > END
> > -----------------------------------------------------------------------
> >
> > I would like to know what results various
> > compilers produce for the program shown
> > above.
> Both gfortran and nagfor reject it:
>
> $ gfortran x.f
> x.f:6:16:
>
> 6 | DATA X/0/
> | 1
> Error: Host associated variable ‘x’ may not be in the DATA statement at (1)
> $ nagfor x.f
> NAG Fortran Compiler Release 7.1(Hanzomon) Build 7101
> Error: x.f, line 6: Invalid redeclaration of host symbol X
> detected at DATA@X
> [NAG Fortran Compiler pass 1 error termination, 1 error]

Re: What does this do?

<006fed18-46a4-498d-b0cf-ccc4c6775bcan@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2566&group=comp.lang.fortran#2566

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:cc9:0:b0:6b5:ce98:334 with SMTP id 192-20020a370cc9000000b006b5ce980334mr7326585qkm.459.1658068947861;
Sun, 17 Jul 2022 07:42:27 -0700 (PDT)
X-Received: by 2002:a0d:dbc3:0:b0:31d:f1e:7e8e with SMTP id
d186-20020a0ddbc3000000b0031d0f1e7e8emr25290188ywe.180.1658068947655; Sun, 17
Jul 2022 07:42:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 17 Jul 2022 07:42:27 -0700 (PDT)
In-Reply-To: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.39.107; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 165.225.39.107
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <006fed18-46a4-498d-b0cf-ccc4c6775bcan@googlegroups.com>
Subject: Re: What does this do?
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Sun, 17 Jul 2022 14:42:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1780
 by: FortranFan - Sun, 17 Jul 2022 14:42 UTC

On Sunday, July 17, 2022 at 5:29:55 AM UTC-4, Robert Corbett wrote:
> ..
> I would like to know what results various
> compilers produce for the program shown
> above. ..

Intel Fortran compiler gives a similar response as gfortran:

C:\temp>ifort /c /standard-semantics p.f
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.6.0 Build 20220226_000000
Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

p.f(6): error #6008: A data-stmt-object must not be an object made accessible through host or use association. [X]
DATA X/0/
-----------^
compilation aborted for p.f (code 1)

Re: What does this do?

<c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2568&group=comp.lang.fortran#2568

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:589:b0:319:ddca:37e4 with SMTP id c9-20020a05622a058900b00319ddca37e4mr18107015qtb.36.1658070153140;
Sun, 17 Jul 2022 08:02:33 -0700 (PDT)
X-Received: by 2002:a25:3741:0:b0:66e:df3d:fbc9 with SMTP id
e62-20020a253741000000b0066edf3dfbc9mr22537610yba.245.1658070152923; Sun, 17
Jul 2022 08:02:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.freedyn.de!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 17 Jul 2022 08:02:32 -0700 (PDT)
In-Reply-To: <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.39.107; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 165.225.39.107
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
<tb0mu6$2tj$1@newsreader4.netcologne.de> <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com>
Subject: Re: What does this do?
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Sun, 17 Jul 2022 15:02:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: FortranFan - Sun, 17 Jul 2022 15:02 UTC

On Sunday, July 17, 2022 at 6:45:36 AM UTC-4, Robert Corbett wrote:
> .. There is something missing
> in the standard, and so the program is not standard
> conforming because the standard does not
> establish a meaning for the program. That hole in
> the standard is what prompted me to ask the
> question...

Bob,

It will be interesting to learn more from you re: the hole in the standard. Currently I fail to find any such hole, but I am surely overlooking something that you are not.

Is your understanding the standard as written currently permits the code you show in the original to get reduced *effectively* to the following whereas the processors are somehow following some unstated semantics to detect and report nonconformance but which the standard has not made clear?

INTEGER X
X = 3
DATA X/0/
PRINT *, X
END

By the way, I had presumed "DATA statement among executables" was now deleted from the standard: actually it is not! It is still supported, though it is marked as obsolescent.

Re: What does this do?

<46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2574&group=comp.lang.fortran#2574

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:cd0e:0:b0:473:8489:21a6 with SMTP id b14-20020a0ccd0e000000b00473848921a6mr18949348qvm.11.1658091667481;
Sun, 17 Jul 2022 14:01:07 -0700 (PDT)
X-Received: by 2002:a25:23c8:0:b0:66e:c79b:8d2f with SMTP id
j191-20020a2523c8000000b0066ec79b8d2fmr24461587ybj.319.1658091667213; Sun, 17
Jul 2022 14:01:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 17 Jul 2022 14:01:07 -0700 (PDT)
In-Reply-To: <c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=108.74.162.237; posting-account=r3eTlQoAAAABvPStTQdpPnri4DjaXXqT
NNTP-Posting-Host: 108.74.162.237
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
<tb0mu6$2tj$1@newsreader4.netcologne.de> <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
<c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>
Subject: Re: What does this do?
From: robertpaulcorbett@gmail.com (Robert Corbett)
Injection-Date: Sun, 17 Jul 2022 21:01:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 52
 by: Robert Corbett - Sun, 17 Jul 2022 21:01 UTC

The issue is involved, but it has boiled down missing restrictions
on DATA statements in BLOCK constructs. The objects in a DATA
statement must have their rank known and their type and type
parameter values known before they can appear. That is all OK
here, so I see nothing in the standard that makes the program I
provided nonconforming. I do not doubt that it is intended to be
nonconforming, but I do not think the standard makes it
nonconforming.

There is a statement in subclause 19.4 that seems to require the
DATA statement to appear in the specification part of the BLOCK
construct, but the statement in 19.4 is overridden by a more general
statement in the description of the BLOCK construct.

I have since constructed a new example where the DATA
statement appears in the specification part of the BLOCK
construct and the problem still occurs. Getting it right does not
seem easy, and the feature is of little consequence.

If the standard requires this case to be conforming, it will add
pain for compiler writers for little practical benefit to programmers.

The feature of DATA statements among executable statements
was made obsolescent in Fortran 90.

On Sunday, July 17, 2022 at 8:02:34 AM UTC-7, FortranFan wrote:
> On Sunday, July 17, 2022 at 6:45:36 AM UTC-4, Robert Corbett wrote:
> > .. There is something missing
> > in the standard, and so the program is not standard
> > conforming because the standard does not
> > establish a meaning for the program. That hole in
> > the standard is what prompted me to ask the
> > question...
>
> Bob,
>
> It will be interesting to learn more from you re: the hole in the standard. Currently I fail to find any such hole, but I am surely overlooking something that you are not.
>
> Is your understanding the standard as written currently permits the code you show in the original to get reduced *effectively* to the following whereas the processors are somehow following some unstated semantics to detect and report nonconformance but which the standard has not made clear?
>
> INTEGER X
> X = 3
> DATA X/0/
> PRINT *, X
> END
> By the way, I had presumed "DATA statement among executables" was now deleted from the standard: actually it is not! It is still supported, though it is marked as obsolescent.

Re: What does this do?

<700764cd-e78a-451b-a15b-36795c99e42an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2578&group=comp.lang.fortran#2578

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:5c7:b0:31e:cd3a:929c with SMTP id d7-20020a05622a05c700b0031ecd3a929cmr18544115qtb.277.1658095580636;
Sun, 17 Jul 2022 15:06:20 -0700 (PDT)
X-Received: by 2002:a81:6988:0:b0:31c:bc55:80d1 with SMTP id
e130-20020a816988000000b0031cbc5580d1mr27200180ywc.431.1658095580387; Sun, 17
Jul 2022 15:06:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 17 Jul 2022 15:06:20 -0700 (PDT)
In-Reply-To: <46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:f14a:56f5:19eb:cf4f;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:f14a:56f5:19eb:cf4f
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
<tb0mu6$2tj$1@newsreader4.netcologne.de> <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
<c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com> <46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <700764cd-e78a-451b-a15b-36795c99e42an@googlegroups.com>
Subject: Re: What does this do?
From: urbanjost@comcast.net (John)
Injection-Date: Sun, 17 Jul 2022 22:06:20 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2096
 by: John - Sun, 17 Jul 2022 22:06 UTC

Under "8.1.4 BLOCK construct" it states

2 Except for the ASYNCHRONOUS and VOLATILE statements, specifications
in a BLOCK construct declare construct entities whose scope is that
of the BLOCK construct (16.4).

I think that means the restriction is correct, in that the DATA statement
is specifying the initial saved valuea. So if the declaration for X is
in the block it would be OK, but not otherwise. This appears to work,
which supports that interpretation ...

> program main
> implicit none
> integer :: i
> do i=1,3
> block
> integer x
> data x/0/
> x = x + 1
> print *, x
> end block
> enddo
> end program main

Re: What does this do?

<J3gBK.40812$Sf2.33098@fx34.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2589&group=comp.lang.fortran#2589

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx34.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:102.0)
Gecko/20100101 Thunderbird/102.0.2
Subject: Re: What does this do?
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
<tb0mu6$2tj$1@newsreader4.netcologne.de>
<51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
<c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com>
<46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>
<700764cd-e78a-451b-a15b-36795c99e42an@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <700764cd-e78a-451b-a15b-36795c99e42an@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 41
Message-ID: <J3gBK.40812$Sf2.33098@fx34.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Mon, 18 Jul 2022 11:42:17 -0500
X-Received-Bytes: 2671
 by: Ron Shepard - Mon, 18 Jul 2022 16:42 UTC

On 7/17/22 5:06 PM, John wrote:
> Under "8.1.4 BLOCK construct" it states
>
> 2 Except for the ASYNCHRONOUS and VOLATILE statements, specifications
> in a BLOCK construct declare construct entities whose scope is that
> of the BLOCK construct (16.4).
>
> I think that means the restriction is correct, in that the DATA statement
> is specifying the initial saved valuea. So if the declaration for X is
> in the block it would be OK, but not otherwise. This appears to work,
> which supports that interpretation ...
>
>> program main
>> implicit none
>> integer :: i
>> do i=1,3
>> block
>> integer x
>> data x/0/
>> x = x + 1
>> print *, x
>> end block
>> enddo
>> end program main

Yes, I think this issue does depend on how implicit typing applies to
the block, and also how implied save applies to the data statment. Is
the x within the block a new implicitly typed variable, or is it the
same one outside the block. The explicit declaration within the block
resolves that ambiguity.

I'm still uncertain about the DATA statement in that case. Does the DATA
statement within the block change anything regarding the implicit typing?

In any case, this is something that a programmer should never do. Even
if the behavior is, now or in the future, specified by the language,
this is such an obscure corner case that no one should expect other
programmers to know what is happening.

$.02 -Ron Shepard

Re: What does this do?

<f370bac6-284a-4484-9a14-fec0e23c6ae5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2593&group=comp.lang.fortran#2593

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:4b48:0:b0:31e:fa8c:8555 with SMTP id e8-20020ac84b48000000b0031efa8c8555mr1245593qts.416.1658188004676;
Mon, 18 Jul 2022 16:46:44 -0700 (PDT)
X-Received: by 2002:a05:6902:124e:b0:668:222c:e8da with SMTP id
t14-20020a056902124e00b00668222ce8damr28472791ybu.383.1658188004474; Mon, 18
Jul 2022 16:46:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!45.76.7.193.MISMATCH!3.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 18 Jul 2022 16:46:44 -0700 (PDT)
In-Reply-To: <J3gBK.40812$Sf2.33098@fx34.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:fd9d:5ab4:6d58:1940;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:fd9d:5ab4:6d58:1940
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
<tb0mu6$2tj$1@newsreader4.netcologne.de> <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
<c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com> <46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>
<700764cd-e78a-451b-a15b-36795c99e42an@googlegroups.com> <J3gBK.40812$Sf2.33098@fx34.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f370bac6-284a-4484-9a14-fec0e23c6ae5n@googlegroups.com>
Subject: Re: What does this do?
From: urbanjost@comcast.net (John)
Injection-Date: Mon, 18 Jul 2022 23:46:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 113
 by: John - Mon, 18 Jul 2022 23:46 UTC

On Monday, July 18, 2022 at 12:42:21 PM UTC-4, Ron Shepard wrote:
> On 7/17/22 5:06 PM, John wrote:
> > Under "8.1.4 BLOCK construct" it states
> >
> > 2 Except for the ASYNCHRONOUS and VOLATILE statements, specifications
> > in a BLOCK construct declare construct entities whose scope is that
> > of the BLOCK construct (16.4).
> >
> > I think that means the restriction is correct, in that the DATA statement
> > is specifying the initial saved valuea. So if the declaration for X is
> > in the block it would be OK, but not otherwise. This appears to work,
> > which supports that interpretation ...
> >
> >> program main
> >> implicit none
> >> integer :: i
> >> do i=1,3
> >> block
> >> integer x
> >> data x/0/
> >> x = x + 1
> >> print *, x
> >> end block
> >> enddo
> >> end program main
> Yes, I think this issue does depend on how implicit typing applies to
> the block, and also how implied save applies to the data statment. Is
> the x within the block a new implicitly typed variable, or is it the
> same one outside the block. The explicit declaration within the block
> resolves that ambiguity.
>
> I'm still uncertain about the DATA statement in that case. Does the DATA
> statement within the block change anything regarding the implicit typing?
>
> In any case, this is something that a programmer should never do. Even
> if the behavior is, now or in the future, specified by the language,
> this is such an obscure corner case that no one should expect other
> programmers to know what is happening.
>
> $.02 -Ron Shepard
test1)$ gfortran /tmp/x2.f90
/tmp/x2.f90:7:7:

7 | data x/0/
| 1
Error: Host associated variable ‘x’ may not be in the DATA statement at (1)
(test1)$ ifort /tmp/x2.f90
/tmp/x2.f90(7): error #6239: This is an invalid DATA statement object. [X]
data x/0/
-----^
/tmp/x2.f90(7): error #6404: This name does not have a type, and must have an explicit type. [X]
data x/0/
-----^
compilation aborted for /tmp/x2.f90 (code 1)
(test1)$ nvfortran /tmp/x2.f90
NVFORTRAN-S-0038-Symbol, x, has not been explicitly declared (/tmp/x2.f90)
0 inform, 0 warnings, 1 severes, 0 fatal for main
# remove implicit none
(test1)$ vi /tmp/x2.f90
gfortran /tmp/x2.f90
/tmp/x2.f90:6:7:

6 | data x/0/
| 1
Error: Host associated variable ‘x’ may not be in the DATA statement at (1)
(test1) $ !ifort
ifort /tmp/x2.f90
/tmp/x2.f90(6): error #6008: A data-stmt-object must not be an object made accessible through host or use association. [X]
data x/0/
-----^
compilation aborted for /tmp/x2.f90 (code 1)
(test1 !nv
nvfortran /tmp/x2.f90

With three compilers I get an error if I add IMPLICIT NONE at the top, and two compilers get an error but one actually compiles if I remove it.
It is interesting how the message changes.

If I then remove the INTEGER statement and add a WRITE(*,*)X after the loop gfortran and nvfortran run treating the two X variables as distinct and IFORT still will not compile it. Entertaining dusty corner. So the interpretation that makes sense is that the DATA statement in a block statement can only apply to a variable explicitly declared in the BLOCK but when implicit typing is on two compilers say it is illegal to have the DATA statement set a value for an X declared outside of the block, while the third one seems to assume that if the DATA statement were outside the block it would define a variable; so it does the same thing in the block and creates a second X whose scope is just the block. I have not found anything so far explicitly saying you cannot use a DATA statement to declare a variable with scope just in the block. If it is not in there somewhere along with a statement saying a DATA statement only applies to the scope of the block it should. Not saying it does not somewhere for sure, but could not find it. The near-consistency of three compilers makes me think it is in there somewhere and that at least one of the compilers therefore does have a bug. The question seems to be is a DATA statement in a BLOCK equivalent to a declaration in the block of "INTEGER :: X=0"? Since I almost never use DATA statements in new code and most older code does not have a BLOCK statement in it; and when I do use a DATA statement in VERY rare occasions I put it in the outer scope before executable statements I imagine I would never have hit this on my own. My take-away is never put a DATA statement in a BLOCK (too) ! A LONG time ago someone advised me to always take the well worn path when I had a choice unless I liked filing compiler bugs. The advice still seems to be holding up.

Re: What does this do?

<2e1b0623-ee4c-4b5d-a814-f853950af27fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2594&group=comp.lang.fortran#2594

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:13cf:b0:6b5:ed16:fc69 with SMTP id g15-20020a05620a13cf00b006b5ed16fc69mr4246304qkl.416.1658188412691;
Mon, 18 Jul 2022 16:53:32 -0700 (PDT)
X-Received: by 2002:a81:1d09:0:b0:31d:a40:8332 with SMTP id
d9-20020a811d09000000b0031d0a408332mr34385054ywd.138.1658188412499; Mon, 18
Jul 2022 16:53:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 18 Jul 2022 16:53:32 -0700 (PDT)
In-Reply-To: <J3gBK.40812$Sf2.33098@fx34.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:5d3f:52f:6dc6:5514;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:5d3f:52f:6dc6:5514
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
<tb0mu6$2tj$1@newsreader4.netcologne.de> <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
<c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com> <46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>
<700764cd-e78a-451b-a15b-36795c99e42an@googlegroups.com> <J3gBK.40812$Sf2.33098@fx34.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2e1b0623-ee4c-4b5d-a814-f853950af27fn@googlegroups.com>
Subject: Re: What does this do?
From: gah4@u.washington.edu (gah4)
Injection-Date: Mon, 18 Jul 2022 23:53:32 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 20
 by: gah4 - Mon, 18 Jul 2022 23:53 UTC

On Monday, July 18, 2022 at 9:42:21 AM UTC-7, Ron Shepard wrote:

(snip)

> In any case, this is something that a programmer should never do. Even
> if the behavior is, now or in the future, specified by the language,
> this is such an obscure corner case that no one should expect other
> programmers to know what is happening.
I suspect that there are a lot of things that a programmer should never
do, but that the standard allows. For one, some programs are generated
by other programs, not by programmers.

That sometimes results in constructs that programmers wouldn't use,
but the logic requires.

One program I used to use generated a comment like:

C THIS WAS WRITTEN BY A PROGRAM, AND IS NOT MEANT TO BE UNDERSTOOD BY HUMANS

Re: What does this do?

<1dd13d21-1cd7-4af8-b4ab-08e4809ead70n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2595&group=comp.lang.fortran#2595

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:44c3:b0:6b5:fb6b:d6c9 with SMTP id y3-20020a05620a44c300b006b5fb6bd6c9mr1640930qkp.537.1658204447093;
Mon, 18 Jul 2022 21:20:47 -0700 (PDT)
X-Received: by 2002:a25:f606:0:b0:66e:3700:41bc with SMTP id
t6-20020a25f606000000b0066e370041bcmr31756574ybd.238.1658204446887; Mon, 18
Jul 2022 21:20:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 18 Jul 2022 21:20:46 -0700 (PDT)
In-Reply-To: <f370bac6-284a-4484-9a14-fec0e23c6ae5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:29ad:b6e9:b821:7606;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:29ad:b6e9:b821:7606
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
<tb0mu6$2tj$1@newsreader4.netcologne.de> <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
<c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com> <46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>
<700764cd-e78a-451b-a15b-36795c99e42an@googlegroups.com> <J3gBK.40812$Sf2.33098@fx34.iad>
<f370bac6-284a-4484-9a14-fec0e23c6ae5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1dd13d21-1cd7-4af8-b4ab-08e4809ead70n@googlegroups.com>
Subject: Re: What does this do?
From: gah4@u.washington.edu (gah4)
Injection-Date: Tue, 19 Jul 2022 04:20:47 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2057
 by: gah4 - Tue, 19 Jul 2022 04:20 UTC

On Monday, July 18, 2022 at 4:46:46 PM UTC-7, John wrote:

(snip)

> A LONG time ago someone advised me to always take the well worn path when
> I had a choice unless I liked filing compiler bugs. The advice still seems to be holding up.

When I was first learning Fortran, first year of high school, I tended to do the opposite.
(And in driving, I have a tendency to go the path I haven't before, for variety or
to see new scenery.)

So, I was better than average at finding bugs in compilers, and other systems.

Re: What does this do?

<2e86d1c4-bedf-40cf-9624-e18289262a66n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2596&group=comp.lang.fortran#2596

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ae9:ec0b:0:b0:6b2:7946:6cd1 with SMTP id h11-20020ae9ec0b000000b006b279466cd1mr19512190qkg.304.1658214305506;
Tue, 19 Jul 2022 00:05:05 -0700 (PDT)
X-Received: by 2002:a81:1d09:0:b0:31d:a40:8332 with SMTP id
d9-20020a811d09000000b0031d0a408332mr35745556ywd.138.1658214305197; Tue, 19
Jul 2022 00:05:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Tue, 19 Jul 2022 00:05:05 -0700 (PDT)
In-Reply-To: <1dd13d21-1cd7-4af8-b4ab-08e4809ead70n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
<tb0mu6$2tj$1@newsreader4.netcologne.de> <51e544c0-3f4f-4688-96c4-037dadebd5b6n@googlegroups.com>
<c8876a09-deb5-4fe6-8aa0-0d8c55804302n@googlegroups.com> <46232be0-3fd1-45c8-8bd7-65817bd9d00dn@googlegroups.com>
<700764cd-e78a-451b-a15b-36795c99e42an@googlegroups.com> <J3gBK.40812$Sf2.33098@fx34.iad>
<f370bac6-284a-4484-9a14-fec0e23c6ae5n@googlegroups.com> <1dd13d21-1cd7-4af8-b4ab-08e4809ead70n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2e86d1c4-bedf-40cf-9624-e18289262a66n@googlegroups.com>
Subject: Re: What does this do?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Tue, 19 Jul 2022 07:05:05 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2457
 by: Robin Vowels - Tue, 19 Jul 2022 07:05 UTC

On Tuesday, July 19, 2022 at 2:20:48 PM UTC+10, gah4 wrote:
> On Monday, July 18, 2022 at 4:46:46 PM UTC-7, John wrote:
>
> > A LONG time ago someone advised me to always take the well worn path when
> > I had a choice unless I liked filing compiler bugs. The advice still seems to be holding up.
>
> When I was first learning Fortran, first year of high school, I tended to do the opposite.
> (And in driving, I have a tendency to go the path I haven't before, for variety or
> to see new scenery.)
>
> So, I was better than average at finding bugs in compilers, and other systems.
>
In the old days, you didn't need to find bugs, they found you.
From IBM's Release 13 there were hundreds of bugs.
We installed R13, but after a short time reverted (upgraded?) to Release 11.
The Fortran 4E compiler didn't work at all.
The next release we installed, I think R15, IBM had fixed 1,100 bugs.

Re: What does this do?

<jk5hsiFn7hqU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2613&group=comp.lang.fortran#2613

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: steve@seesignature.invalid (Steve Lionel)
Newsgroups: comp.lang.fortran
Subject: Re: What does this do?
Date: Sun, 24 Jul 2022 14:38:10 -0400
Lines: 28
Message-ID: <jk5hsiFn7hqU1@mid.individual.net>
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net q/7War8AmeAI7JC6m3iNyAIRB4SJ0wDl0hyFKpmBmnUtIJh3a3
Cancel-Lock: sha1:gRN8RugquYakrpYWmCjSlMFJQ7g=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101
Thunderbird/103.0
Content-Language: en-US
In-Reply-To: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com>
 by: Steve Lionel - Sun, 24 Jul 2022 18:38 UTC

On 7/17/2022 5:29 AM, Robert Corbett wrote:
Snip
>
> I would like to know what results various
> compilers produce for the program shown
> above. The compilers need to be of recent
> vintage as the BLOCK construct was new
> in Fortran 2008.

A paper, triggered by Robert's question, was passed at the
just-concluded J3 meeting. The answer was that this example is
non-conforming (it is equivalent to example "bad" in the paper), and
edits were provided to clarify this. As there will be no more
interpretations published for Fortran 2018 (a Corrigendum 2 is in
process), this change will go into Fortran 2023. See
https://j3-fortran.org/doc/year/22/22-179r2.txt for more.

--
Steve Lionel
ISO/IEC JTC1/SC22/WG5 (Fortran) Convenor
Retired Intel Fortran developer/support
Email: firstname at firstnamelastname dot com
Twitter: @DoctorFortran
LinkedIn: https://www.linkedin.com/in/stevelionel
Blog: https://stevelionel.com/drfortran
WG5: https://wg5-fortran.org

Re: What does this do?

<c538292e-3dbc-4925-a5bf-b8e45ab2a599n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2664&group=comp.lang.fortran#2664

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:4442:b0:6b2:844e:ee67 with SMTP id w2-20020a05620a444200b006b2844eee67mr17975538qkp.625.1659527905601;
Wed, 03 Aug 2022 04:58:25 -0700 (PDT)
X-Received: by 2002:a81:52c9:0:b0:31f:479b:54eb with SMTP id
g192-20020a8152c9000000b0031f479b54ebmr23041516ywb.180.1659527905312; Wed, 03
Aug 2022 04:58:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 3 Aug 2022 04:58:25 -0700 (PDT)
In-Reply-To: <jk5hsiFn7hqU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=108.74.162.237; posting-account=r3eTlQoAAAABvPStTQdpPnri4DjaXXqT
NNTP-Posting-Host: 108.74.162.237
References: <f8e41012-2fcf-4f9d-afa5-162c4e50ee7dn@googlegroups.com> <jk5hsiFn7hqU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c538292e-3dbc-4925-a5bf-b8e45ab2a599n@googlegroups.com>
Subject: Re: What does this do?
From: robertpaulcorbett@gmail.com (Robert Corbett)
Injection-Date: Wed, 03 Aug 2022 11:58:25 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2603
 by: Robert Corbett - Wed, 3 Aug 2022 11:58 UTC

I offer thanks to everyone who provided information
about how compilers handle my example. That
information resulted in changes to the upcoming
edition of the standard. The changes are
described in papers 22-158r1 and 22-179r2.

The committee decided that my example program
conforms to the Fortran 2008 and 2018 standards,
but that that was not intended. No major compiler
accepted the program. One implementor said his
compiler would handle my example program once
it is complete.

The program is not hard to handle. A compiler
that can handle an ASSOCIATE construct must
have mechanisms that could be used to handle
my example. Nonetheless, no one (including me)
thought it was worth making compilers change to
handle my example, so the standard was changed
so that they would not need to handle my example.

Some people claimed that the problem would
disappear once DATA statements among
executable statements, an obsolescent feature,
were disallowed. That claim is false. The
program can be modified to demonstrate the
same problem without using obsolescent features.
The modified program will still be non-conformant
because of the edits in paper 22-179r2.

The edits provided in paper 22-158r1 are not ideal.
A better fix is possible, but it would involve more
extensive edits. Given the current timeline for the
next edition of the standard, the smaller change
seems safer.

Thank you again,
Bob Corbett

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor