From c2cc83bc88a5a37a37b46bda1f3263a8bcca87e5 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Fri, 7 Aug 2015 16:23:53 +0000 Subject: [PATCH] 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 --- libgfortran/ChangeLog | 5 +++++ libgfortran/runtime/main.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 04a2b923f19..ffd6cfd3cbf 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2015-08-07 Francois-Xavier Coudert + + PR libfortran/66458 + * runtime/main.c (init): Only call set_fpu() if requested by user. + 2015-08-06 Francois-Xavier Coudert * runtime/compile_options.c (set_options): Fix typos. diff --git a/libgfortran/runtime/main.c b/libgfortran/runtime/main.c index 3c66a30fff2..cb8e518b582 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 -- 2.30.2