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] PR29642 - Fortran 2003: VALUE Attribute (pass by value)


+     if ((a%x /= b%x) .or. (a%c /= b%c)) dtne = .TRUE.
+   if (r /= 42.0) call abort ()
+   if (z /= (-99.0, 199.0)) call abort ()
+     if (r /= 42.0) call abort ()
+     if (r /= 99.0) call abort ()
+     if (z /= (-99.0, 199.0)) call abort ()
+     if (z /= (77.0, -42.0)) call abort ()
Please replace the real/complex tests by something like
    abs(a%x-b%x) > epsilon(a%x)
etc. Here it accidentally works, though.

I have to say that I differ here. There's no arithmetic done on the variables here, so the values should really be exactly the same, and a simple /= operator is, IMHO, sufficient.


Thanks Tobias for reviewing Paul's patch,
FX


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