[Bug fortran/104346] Problem with overloaded assignment when LHS is allocatable array

2023-02-15 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104346

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|UNCONFIRMED |RESOLVED

--- Comment #2 from anlauf at gcc dot gnu.org ---
(In reply to Vivek Rao from comment #1)
> It is explained at
> https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-
> overloaded-assignment-when-LHS-is-allocatable-array/m-p/1356757/highlight/
> true#M159812 that the code is not conforming, so this issue can be closed.

Thanks for following up.

This is also confirmed by checking with e.g. NAG.  Thus closing.

[Bug fortran/104346] Problem with overloaded assignment when LHS is allocatable array

2022-02-02 Thread vivekrao4 at yahoo dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104346

--- Comment #1 from Vivek Rao  ---
It is explained at
https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-overloaded-assignment-when-LHS-is-allocatable-array/m-p/1356757/highlight/true#M159812
that the code is not conforming, so this issue can be closed.

"In this case, the standard essentially places the onus on the program (and by
extension its author) to conform, the processor (compiler being part of it) is
not required to issue diagnostics.

And the issue is this: with the defined assignment as specified, the standard
semantics requires the 'ialloc` to be allocated to the right shape prior to
assignment on line 23: "ialloc = ["4","9"]".

You can retry with `allocate( ialloc(2) )` statement preceding the above
assignment and check the program response."