From: Francois-Xavier Coudert Date: Fri, 7 Aug 2015 16:23:53 +0000 (+0000) Subject: re PR libfortran/66458 (Loading libgfortran.so changes the FPU exception flags) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2cc83bc88a5a37a37b46bda1f3263a8bcca87e5;p=gcc.git 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 --- 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