This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran, patch] IEEE intrinsic modules (ping)
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>, FX Coudert <fxcoudert at gmail dot com>
- Date: Thu, 10 Jul 2014 09:31:28 +0200
- Subject: Re: [fortran, patch] IEEE intrinsic modules (ping)
- Authentication-results: sourceware.org; auth=none
Hello!
>> The only thing I can see is that libgfortran/config/fpu-sysv.h assumes that
>> FP_RM and others are macros, checking them with "#ifdef FP_RMâ. Is that the
>> reason?
>
> It is.
>
>> If so, we might just want to use them unconditionallyâ unless it creates a
>> mess on some other SysV target!
>
> FWIW, those FP_* values are also enum values in IRIX 6.5 <ieeefp.h>, the
> only other SysV target I have around. Seems this file is common between
> all of them, so the risk should be manageable.
@@ -401,33 +381,13 @@ support_fpu_rounding_mode (int mode)
switch (mode)
{
case GFC_FPE_TONEAREST:
-#ifdef FP_RN
return 1;
-#else
- return 0;
-#endif
-
case GFC_FPE_UPWARD:
-#ifdef FP_RP
return 1;
-#else
- return 0;
-#endif
-
case GFC_FPE_DOWNWARD:
-#ifdef FP_RM
return 1;
-#else
- return 0;
-#endif
-
case GFC_FPE_TOWARDZERO:
-#ifdef FP_RZ
return 1;
-#else
- return 0;
-#endif
-
default:
return 0;
Since all modes are supported, you can unconditionally return 1 in the
code above, as is the case with fpu-387.h.
Uros.