public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [libgfortran,patch] FPU initialization
@ 2015-08-07 15:56 FX
  2015-08-07 16:13 ` Steve Kargl
  0 siblings, 1 reply; 2+ messages in thread
From: FX @ 2015-08-07 15:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: gfortran

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

Attached patch fixes libgfortran’s FPU initialization by only performing it when the user explicitly asked for it, with option -ffpe-trap.

Bootstrapped and regtested on x86_64-apple-darwin14.
OK to commit to trunk?

FX


[-- Attachment #2: fpu.ChangeLog --]
[-- Type: application/octet-stream, Size: 152 bytes --]

2015-08-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR libfortran/66458
	* runtime/main.c (init): Only call set_fpu() if requested by user.


[-- Attachment #3: fpu.diff --]
[-- Type: application/octet-stream, Size: 449 bytes --]

Index: libgfortran/runtime/main.c
===================================================================
--- libgfortran/runtime/main.c	(revision 226632)
+++ libgfortran/runtime/main.c	(working copy)
@@ -263,7 +263,11 @@ init (void)
   init_variables ();
 
   init_units ();
-  set_fpu ();
+
+  /* If (and only if) the user asked for it, set up the FPU state.  */
+  if (options.fpe != 0)
+    set_fpu ();
+
   init_compile_options ();
 
 #ifdef DEBUG

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [libgfortran,patch] FPU initialization
  2015-08-07 15:56 [libgfortran,patch] FPU initialization FX
@ 2015-08-07 16:13 ` Steve Kargl
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Kargl @ 2015-08-07 16:13 UTC (permalink / raw)
  To: FX; +Cc: gcc-patches, gfortran

On Fri, Aug 07, 2015 at 05:56:42PM +0200, FX wrote:
> Attached patch fixes libgfortran???s FPU initialization by only performing it when the user explicitly asked for it, with option -ffpe-trap.
> 
> Bootstrapped and regtested on x86_64-apple-darwin14.
> OK to commit to trunk?
> 

OK.

-- 
Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-07 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 15:56 [libgfortran,patch] FPU initialization FX
2015-08-07 16:13 ` Steve Kargl

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).