This patch fixes PR libfortran/78314, the failure of gfortran.dg/ieee/ieee_6.f90 on some Arm and Aarch64 platforms. As mentioned in the PR trapping fpu exceptions is optional on ARM and this function cannot do a runtime check for support so we should return 0.
There are a couple of discussion strings about this issue, pointers to them are in the PR. This patch has already been suggested by a couple of people (Uros and Christophe) but never been checked in. Can we go ahead and check it in? Tested on Aarch64 (ThunderX) with no regressions. Steve Ellcey sell...@marvell.com 2019-07-22 Steve Ellcey <sell...@marvell.com> PR libfortran/78314 * config/fpu-glibc.h (support_fpu_trap): Return 0 for Arm/Aarch64. diff --git a/libgfortran/config/fpu-glibc.h b/libgfortran/config/fpu-glibc.h index df2588e..692091c 100644 --- a/libgfortran/config/fpu-glibc.h +++ b/libgfortran/config/fpu-glibc.h @@ -129,7 +129,11 @@ get_fpu_trap_exceptions (void) int support_fpu_trap (int flag) { +#if defined(__arm__) || defined(__aarch64__) + return 0; +#else return support_fpu_flag (flag); +#endif }