diff mbox series

[fortran,arm] Fix PR 78314 on arm and aarch64

Message ID 524c5caeefba62c5fcee5642934455798b0db49a.camel@marvell.com
State New
Headers show
Series [fortran,arm] Fix PR 78314 on arm and aarch64 | expand

Commit Message

Steve Ellcey July 22, 2019, 3:56 p.m. UTC
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
sellcey@marvell.com



2019-07-22  Steve Ellcey  <sellcey@marvell.com>

	PR libfortran/78314
	* config/fpu-glibc.h (support_fpu_trap): Return 0 for Arm/Aarch64.
diff mbox series

Patch

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
 }