This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/19904] [4.1 Only] Division by zero leads to error
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2006 05:37:15 -0000
- Subject: [Bug fortran/19904] [4.1 Only] Division by zero leads to error
- References: <bug-19904-7427@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2006-06-28 05:37 -------
Subject: Bug 19904
Author: jvdelisle
Date: Wed Jun 28 05:36:08 2006
New Revision: 115048
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115048
Log:
2006-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/19310
PR fortran/19904
* 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.
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/arith.c
branches/gcc-4_1-branch/gcc/fortran/gfortran.h
branches/gcc-4_1-branch/gcc/fortran/invoke.texi
branches/gcc-4_1-branch/gcc/fortran/lang.opt
branches/gcc-4_1-branch/gcc/fortran/options.c
branches/gcc-4_1-branch/gcc/fortran/simplify.c
branches/gcc-4_1-branch/gcc/fortran/trans-const.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19904