[J3] [EXTERNAL] Re: Changing address of an allocatable on assignment when shapes match

Malcolm Cohen malcolm at nag-j.co.jp
Sat Aug 24 01:29:01 EDT 2019


The breakage would be if you moved the target, a pointer to that target would stop working, i.e. the semantics would be broken.

Unless, of course, one updates all the associated pointers when you move a target (like compacting garbage collectors do).

Cheers,

From: Vipul Parekh via J3 
Sent: Saturday, August 24, 2019 12:14 PM
To: General J3 interest list 
Cc: Vipul Parekh 
Subject: Re: [J3] [EXTERNAL] Re: Changing address of an allocatable on assignment when shapes match

I couldn't understand the statement, "In general, it would not be
conforming to do the reallocation if the allocatable array has the
TARGET attribute, as this would break the Fortran pointer association
semantics" - can someone please point me to the relevant section(s)
(and paragraph(s)) in the standard that might explain it for me?

Thanks,
Vipul Parekh


On Fri, Aug 23, 2019 at 9:16 PM Malcolm Cohen via J3
<j3 at mailman.j3-fortran.org> wrote:
>
> We do say so! We state precisely when “reallocation” happens. It’s not called “reallocation” either; it is called “deallocating” followed by “allocating”.
>
> And “reallocation” is already in the reasons, seeing as how it is stated as “deallocation”, which is already in the reasons. ..



Disclaimer

The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. Please see our Privacy Notice for information on how we process personal data and for details of how to stop or limit communications from us.

This e-mail has been scanned for all viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20190824/15ba0f9a/attachment-0001.html>


More information about the J3 mailing list