aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2015-08-07 16:23:53 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2015-08-07 16:23:53 +0000
commitc2cc83bc88a5a37a37b46bda1f3263a8bcca87e5 (patch)
treec07304583ba1607734ee36f4039959fa2d85658e
parent8f3f5ac089f8850f64dad253bc54e31f450e9ddf (diff)
downloadgcc-c2cc83bc88a5a37a37b46bda1f3263a8bcca87e5.zip
gcc-c2cc83bc88a5a37a37b46bda1f3263a8bcca87e5.tar.gz
gcc-c2cc83bc88a5a37a37b46bda1f3263a8bcca87e5.tar.bz2
re PR libfortran/66458 (Loading libgfortran.so changes the FPU exception flags)
PR libfortran/66458 * runtime/main.c (init): Only call set_fpu() if requested by user. From-SVN: r226725
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/runtime/main.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 04a2b92..ffd6cfd 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2015-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* runtime/compile_options.c (set_options): Fix typos.
diff --git a/libgfortran/runtime/main.c b/libgfortran/runtime/main.c
index 3c66a30..cb8e518 100644
--- a/libgfortran/runtime/main.c
+++ b/libgfortran/runtime/main.c
@@ -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