diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2006-06-18 06:36:45 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2006-06-18 06:36:45 +0000 |
commit | 545548257d8ad0c0663f70c61a1fd189eaf896b8 (patch) | |
tree | 9f73b7afa27dd254cb18534c5d1ceda6349bf744 /gcc/fortran/invoke.texi | |
parent | 37b4da102f718345282ca7f9b5c7bf9be857fd47 (diff) | |
download | gcc-545548257d8ad0c0663f70c61a1fd189eaf896b8.zip gcc-545548257d8ad0c0663f70c61a1fd189eaf896b8.tar.gz gcc-545548257d8ad0c0663f70c61a1fd189eaf896b8.tar.bz2 |
re PR fortran/19310 ([4.1 Only] unnecessary error for overflowing results)
2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/19310
* arith.c (gfc_range_check): Return ARITH_OK if -fno-range-check. Add
return of ARITH_NAN, ARITH_UNDERFLOW, and ARITH_OVERFLOW.
(gfc_arith_divide): If -fno-range-check allow mpfr to divide by zero.
* gfortran.h (gfc_option_t): Add new flag.
* invoke.texi: Document new flag.
* lang.opt: Add option -frange-check.
* options.c (gfc_init_options): Initialize new flag.
(gfc_handle_options): Set flag if invoked.
* simplify.c (range_check): Add error messages for
overflow, underflow, and other errors.
* trans-const.c (gfc_conv_mpfr_to_tree): Build NaN and Inf from mpfr
result.
From-SVN: r114752
Diffstat (limited to 'gcc/fortran/invoke.texi')
-rw-r--r-- | gcc/fortran/invoke.texi | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index aa646c4..7b8036c 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -122,7 +122,7 @@ by type. Explanations are in the following sections. -ffixed-line-length-@var{n} -ffixed-line-length-none @gol -ffree-line-length-@var{n} -ffree-line-length-none @gol -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 @gol --fcray-pointer -fopenmp } +-fcray-pointer -fopenmp -frange-check } @item Warning Options @xref{Warning Options,,Options to Request or Suppress Warnings}. @@ -308,6 +308,15 @@ and @code{c$}, @code{*$} and @code{!$} sentinels in fixed form and when linking arranges for the OpenMP runtime library to be linked in. +@cindex -frange-check +@cindex options, -frange-check +@item -frange-check +Enable range checking on results of simplification of constant expressions +during compilation. For example, by default, @command{gfortran} will give +an overflow error at compile time when simplifying @code{a = EXP(1000)}. +With @samp{-fno-range-check}, no error will be given and the variable @code{a} +will be assigned the value @code{+Infinity}. + @cindex -std=@var{std} option @cindex option, -std=@var{std} @item -std=@var{std} |