https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67430
Harald Anlauf <anlauf at gmx dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gmx dot de
--- Comment #3 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Andrew Baldwin from comment #2)
> In 7.2.1.4 of my copy of the standard it states:
>
> "A subroutine defines the defined assignment x1 = x2 if"
>
> ...
>
> "(5) either
> (a) the ranks of x1 and x2 match those of d1 and d2 or
> (b) the subroutine is elemental, x1 and x2 are conformable, and there is
> no other subroutine that defines the assignment."
It also says:
"If d1 or d2 is an array, the shapes of x1 and x2 shall match the shapes of d1
and d2 , respectively."
This is not the case for your example.
(NAG and Crayftn also do not reallocation.)
> Since x1 and x2 are not conformable in this instance the defined assignment
> (overloaded assignment) my reading is that it should not occur.
I'm no standard expert, but (5)(a) appears to be satisfied, so the
non-conformance of x1 and x2 does not matter.
To be sure, consider posting your question on comp.lang.fortran.