diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2019-01-30 21:44:35 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2019-01-30 21:44:35 +0100 |
commit | 05dfdd6c5a62a4b2cfaab6be554e859987c2aa79 (patch) | |
tree | 88f641097402f9fecf222205629228d609bea182 /libgfortran/config | |
parent | 9f4e09a89a4879d1a39f6055b61afb8f335e7604 (diff) | |
download | gcc-05dfdd6c5a62a4b2cfaab6be554e859987c2aa79.tar.gz |
re PR fortran/88678 (Many gfortran.dg/ieee/ieee_X.f90 test cases fail starting with r267465)
PR fortran/88678
* config/fpu-glibc.h (support_fpu_trap): Do not try to enable
exceptions to determine if exception is supported.
From-SVN: r268402
Diffstat (limited to 'libgfortran/config')
-rw-r--r-- | libgfortran/config/fpu-glibc.h | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/libgfortran/config/fpu-glibc.h b/libgfortran/config/fpu-glibc.h index 9abdfd95ee3..df2588e038d 100644 --- a/libgfortran/config/fpu-glibc.h +++ b/libgfortran/config/fpu-glibc.h @@ -129,41 +129,7 @@ get_fpu_trap_exceptions (void) int support_fpu_trap (int flag) { - int exceptions = 0; - int old; - - if (!support_fpu_flag (flag)) - return 0; - -#ifdef FE_INVALID - if (flag & GFC_FPE_INVALID) exceptions |= FE_INVALID; -#endif - -#ifdef FE_DIVBYZERO - if (flag & GFC_FPE_ZERO) exceptions |= FE_DIVBYZERO; -#endif - -#ifdef FE_OVERFLOW - if (flag & GFC_FPE_OVERFLOW) exceptions |= FE_OVERFLOW; -#endif - -#ifdef FE_UNDERFLOW - if (flag & GFC_FPE_UNDERFLOW) exceptions |= FE_UNDERFLOW; -#endif - -#ifdef FE_DENORMAL - if (flag & GFC_FPE_DENORMAL) exceptions |= FE_DENORMAL; -#endif - -#ifdef FE_INEXACT - if (flag & GFC_FPE_INEXACT) exceptions |= FE_INEXACT; -#endif - - old = feenableexcept (exceptions); - if (old == -1) - return 0; - fedisableexcept (exceptions & ~old); - return 1; + return support_fpu_flag (flag); } |