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.