aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2007-07-15 16:29:19 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2007-07-15 16:29:19 +0000
commit68d2e027fa110ac1561547716f64cdb9273ecbfb (patch)
treeb304f4c7c4a642c3aa3b7788e5ba9d05dae4bc02 /gcc/fortran/options.c
parent2bb6de3a7e8d27b8f7ea7139fbee5f33c32bf3e5 (diff)
downloadgcc-68d2e027fa110ac1561547716f64cdb9273ecbfb.zip
gcc-68d2e027fa110ac1561547716f64cdb9273ecbfb.tar.gz
gcc-68d2e027fa110ac1561547716f64cdb9273ecbfb.tar.bz2
re PR libfortran/32611 (Print sign of negative zero)
2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/32611 * gfortran.h (gfc_option_t): Add flag_sign_zero field. * lang.opt (-fsign-zero): New option. * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options. * trans-decl.c (gfc_build_builtin_function_decls): Build the function declaration to pass an array containing the options to be used by the runtime library. (gfc_generate_function_code): Build an array that contains option values to be passed to the runtime library and the call to the function. * options.c (gfc_init_options): Initialize the flag_sign_zero field. (gfc_handle_option): Handle the -fsign-zero option. Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> From-SVN: r126655
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 50f5e94..4f3ec2c 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -102,6 +102,7 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED,
gfc_option.flag_cray_pointer = 0;
gfc_option.flag_d_lines = -1;
gfc_option.flag_openmp = 0;
+ gfc_option.flag_sign_zero = 1;
gfc_option.fpe = 0;
@@ -619,6 +620,10 @@ gfc_handle_option (size_t scode, const char *arg, int value)
gfc_handle_module_path_options (arg);
break;
+ case OPT_fsign_zero:
+ gfc_option.flag_sign_zero = value;
+ break;
+
case OPT_ffpe_trap_:
gfc_handle_fpe_trap_option (arg);
break;