Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Hello again, Peabody here..." -- Mister Peabody


devel / comp.lang.fortran / Re: Can ASSOCIATE construct entities be assumed not to alias?

SubjectAuthor
o Re: Can ASSOCIATE construct entities be assumed not to alias?gah4

1
Re: Can ASSOCIATE construct entities be assumed not to alias?

<d540cba3-6b9e-4427-8f22-639786a9a99en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:21ce:b0:746:7a30:7469 with SMTP id h14-20020a05620a21ce00b007467a307469mr904489qka.11.1679290670010;
Sun, 19 Mar 2023 22:37:50 -0700 (PDT)
X-Received: by 2002:a05:6214:ab4:b0:56c:224c:f64b with SMTP id
ew20-20020a0562140ab400b0056c224cf64bmr7005377qvb.6.1679290669836; Sun, 19
Mar 2023 22:37:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.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, 19 Mar 2023 22:37:49 -0700 (PDT)
In-Reply-To: <d2f574b6-5969-407f-86c1-2cb15dae113bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:dccc:ea1c:31ad:4cb0;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:dccc:ea1c:31ad:4cb0
References: <d2f574b6-5969-407f-86c1-2cb15dae113bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d540cba3-6b9e-4427-8f22-639786a9a99en@googlegroups.com>
Subject: Re: Can ASSOCIATE construct entities be assumed not to alias?
From: gah4@u.washington.edu (gah4)
Injection-Date: Mon, 20 Mar 2023 05:37:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 34
 by: gah4 - Mon, 20 Mar 2023 05:37 UTC

On Wednesday, March 15, 2023 at 10:50:13 AM UTC-7, Peter Klausler US wrote:
> On the following program, using default compilation options, two compilers emit code that assumes that ASSOCIATE constructs might alias; one compiler assumes that they do not (producing bad results when they do); three compilers emit code that crashes at runtime. Who's right?
>
> module m
> contains
> subroutine copy(to,from)
> real, intent(out), pointer, contiguous :: to(:)
> real, intent(in), pointer, contiguous :: from(:)
> associate (t => to, f => from)
> t = f
> end associate
> end subroutine
> end

I have never known any C programmers to do it, but:

module m
contains
subroutine copy(to,from)
real, intent(out), pointer, contiguous :: to(:)
real, intent(in), pointer, contiguous :: from(:)
#define f to
#define f from
t = f
#undef t
#undef f
end subroutine

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor