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, gfortran testsuite]: Do not load denormals in gfortran.fortran_torture/intrinsic_nearest.f90



On 23 Aug 2009, at 16:50, N.M. Maclaren wrote:


On Aug 23 2009, Tim Prince wrote:

I ran into a peculiarity with gfortran C interoperability. It throws a fatal KIND mismatch, as KIND(.false.) is 4, and KIND (c_bool) is 1. I assumed that IEEE_SET_UNDERFLOW_MODE(gradual) should work with
logical(c_bool) :: gradual
Have I gone wrong in my assumption, or does the standard require
CALL IEEE_SET_UNDERFLOW_MODE(LOGICAL(.false.,KIND(C_BOOL)))
if IEEE_SET_UNDERFLOW is written according to iso_c_interop ?

Oh, gosh, you really do need a copy of the standard to work from. IEEE
support has nothing to do with C interoperability. IEEE_SET_UNDERFLOW_MODE
etc. are intrinsics, and follow whatever rules Fortran specifies - NOT
necessarily ones that any normal procedure can follow - in this case, its
argument is specified to be a default LOGICAL scalar, so you should be using
just .FALSE.

I definitely need a copy of the standard to work from....


I especially need to understand what to do when the function cannot be honored on a specific target.

.. can you help with a link? or an appropriate abstract.

thanks
Iain


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