public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, fortran, arm]  Fix PR 78314 on arm and aarch64
@ 2019-07-22 16:16 Steve Ellcey
  0 siblings, 0 replies; only message in thread
From: Steve Ellcey @ 2019-07-22 16:16 UTC (permalink / raw)
  To: gcc-patches; +Cc: ubizjak, Wilco.Dijkstra, clyon

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 --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
 }
 
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-22 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 16:16 [PATCH, fortran, arm] Fix PR 78314 on arm and aarch64 Steve Ellcey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).