This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR 47448 - fix defined assignment check


On 01/25/2011 04:30 AM, Tobias Burnus wrote:
Defined assignment ("interface assignment(=)") is not allowed to override
intrinsic assignments. In particular, it is invalid to override
array = scalar
array = array ! for the same rank
while it is valid to use
scalar = array
array = array ! for different ranks.

Seemingly before 2009-08-10 (cf. PR 37425) all those where rejected. However,
with that patch accidentally "array = scalar" and not "scalar = array" became
accepted.

Thus, the patch below fixes a regression in the sense that no error message is
printed with 4.5/4.6 for the invalid test case. However, the valid case was
never allowed.

Build and regtested on x86-64-linux
OK for the trunk? Does anyone want to see this backported to a branch?


Yes, OK and thanks for quick patch.


Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]