This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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 fortran/37425: Finish type-bound operators


Dear Daniel,

Daniel Kraft wrote:
> Attached is the most recent version of my patch, now from my point of
> view every issues are resolved.  Ok for trunk after a fresh
> regression-test?

typebound_operator_1.f90 has:

   SUBROUTINE assign_proc (me, b)
     CLASS(t), INTENT(OUT) :: me
     LOGICAL, INTENT(IN) :: b
     me = t ()
   END SUBROUTINE assign_proc

NAG f95 complains:
ERROR: CLASS variable ME cannot be left-hand-side of intrinsic assignment

I fully agree. How about adding a "logical" component and assigning the
logcial component in assign_proc? For instance:
     me%b = .not. b
(The purpose of the .not. is to make it different from the intrinsic
assignment :-)

Otherwise, the patch looks good can can be checked in.


Please fill, if you didn't do yet, the PR about ELEMENTAL procedures.
(Does this also affect PP(C)?) Ditto regarding the ambiguity check.

Thanks for your patch!

Tobias


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