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

Steve Lionel steve at stevelionel.com
Fri Aug 23 20:21:44 EDT 2019


On 8/23/2019 8:17 PM, Malcolm Cohen via J3 wrote:
> As in, the Sun compiler behaviour, assuming it does that when the 
> TARGET attribute is present, would break some standard-conforming 
> Fortran 90/95 programs.

As I noted earlier, the user reported that adding TARGET disables the 
reallocation in this case.

It's an intriguing optimization, one that would not have occurred to me, 
but that assumes that the deallocate/reallocate is less expensive than 
the second copy. I think users would find this behavior surprising and 
unwanted, though I agree it doesn't seem to violate the standard.

Steve



More information about the J3 mailing list