* [Bug fortran/19310] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
@ 2006-06-07 4:49 ` jvdelisle at gcc dot gnu dot org
2006-06-08 0:11 ` kargl at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-07 4:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2006-06-07 03:28 -------
I would like to work on this one. The range check is only looking for ARITH_OK
when it could also see ARITH_UNDERFLOW or ARITH_OVERFLOW.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
2006-06-07 4:49 ` [Bug fortran/19310] unnecessary error for overflowing results jvdelisle at gcc dot gnu dot org
@ 2006-06-08 0:11 ` kargl at gcc dot gnu dot org
2006-06-08 1:05 ` jvdelisle at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-06-08 0:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kargl at gcc dot gnu dot org 2006-06-08 00:05 -------
(In reply to comment #2)
> I would like to work on this one. The range check is only looking for ARITH_OK
> when it could also see ARITH_UNDERFLOW or ARITH_OVERFLOW.
>
Jerry,
There is another PR about allowing "real, parameter :: inf = 1. / 0.".
In that PR it was suggested to add a -fallow-inf-nan option. I think
you should look into this route for this PR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
2006-06-07 4:49 ` [Bug fortran/19310] unnecessary error for overflowing results jvdelisle at gcc dot gnu dot org
2006-06-08 0:11 ` kargl at gcc dot gnu dot org
@ 2006-06-08 1:05 ` jvdelisle at gcc dot gnu dot org
2006-06-08 1:11 ` jvdelisle at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-08 1:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2006-06-08 01:04 -------
Steve,
I was just about to post an RFC to the list because this PR is requesting a
change of philosophy regarding compile time vs runtime behavior. Your comment
about -fallow-inf-nan answers my question. I can see where some users would
want the compile time error, while others may want to use, for example,
exp(1000) to give an infinity.
I think the patch will be straight forward including updating the appropriate
texi. The -fallow-inf-nan can be applied to range_check in simplify.c and that
will cover most if not all relevant intrinsics.
The default behavior will be to do as is now and give the compile error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-06-08 1:05 ` jvdelisle at gcc dot gnu dot org
@ 2006-06-08 1:11 ` jvdelisle at gcc dot gnu dot org
2006-06-08 1:50 ` kargl at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-08 1:11 UTC (permalink / raw)
To: gcc-bugs
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-12-30 18:59:15 |2006-06-08 01:05:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-06-08 1:11 ` jvdelisle at gcc dot gnu dot org
@ 2006-06-08 1:50 ` kargl at gcc dot gnu dot org
2006-06-09 5:52 ` patchapp at dberlin dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-06-08 1:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kargl at gcc dot gnu dot org 2006-06-08 01:26 -------
(In reply to comment #4)
>
> I think the patch will be straight forward including updating the appropriate
> texi. The -fallow-inf-nan can be applied to range_check in simplify.c and that
> will cover most if not all relevant intrinsics.
>
In thinking about it, you might call the option -fno-range-check and
in lang.opt use the RejectNegative key word. -fallow-inf-nan would
apply to INF and NaN but seems out of place for undeflow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-06-08 1:50 ` kargl at gcc dot gnu dot org
@ 2006-06-09 5:52 ` patchapp at dberlin dot org
2006-06-18 6:42 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: patchapp at dberlin dot org @ 2006-06-09 5:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from patchapp at dberlin dot org 2006-06-09 05:50 -------
Subject: Bug number PR19310
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00435.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-06-09 5:52 ` patchapp at dberlin dot org
@ 2006-06-18 6:42 ` jvdelisle at gcc dot gnu dot org
2006-06-18 6:48 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-18 6:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2006-06-18 06:36 -------
Subject: Bug 19310
Author: jvdelisle
Date: Sun Jun 18 06:36:45 2006
New Revision: 114752
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114752
Log:
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.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/arith.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/invoke.texi
trunk/gcc/fortran/lang.opt
trunk/gcc/fortran/options.c
trunk/gcc/fortran/simplify.c
trunk/gcc/fortran/trans-const.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-06-18 6:42 ` jvdelisle at gcc dot gnu dot org
@ 2006-06-18 6:48 ` jvdelisle at gcc dot gnu dot org
2006-06-18 6:49 ` [Bug fortran/19310] [4.1 Only] " jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-18 6:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2006-06-18 06:42 -------
Subject: Bug 19310
Author: jvdelisle
Date: Sun Jun 18 06:42:26 2006
New Revision: 114753
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114753
Log:
2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/19310
PR fortran/19904
* gfortran.dg/real_const_3.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/real_const_3.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] [4.1 Only] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-06-18 6:48 ` jvdelisle at gcc dot gnu dot org
@ 2006-06-18 6:49 ` jvdelisle at gcc dot gnu dot org
2006-06-28 5:37 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-18 6:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2006-06-18 06:48 -------
Fixed on 4.2
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|unnecessary error for |[4.1 Only] unnecessary error
|overflowing results |for overflowing results
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] [4.1 Only] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-06-18 6:49 ` [Bug fortran/19310] [4.1 Only] " jvdelisle at gcc dot gnu dot org
@ 2006-06-28 5:37 ` jvdelisle at gcc dot gnu dot org
2006-06-28 5:45 ` jvdelisle at gcc dot gnu dot org
2006-06-28 5:49 ` jvdelisle at gcc dot gnu dot org
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-28 5:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2006-06-28 05:37 -------
Subject: Bug 19310
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=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] [4.1 Only] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2006-06-28 5:37 ` jvdelisle at gcc dot gnu dot org
@ 2006-06-28 5:45 ` jvdelisle at gcc dot gnu dot org
2006-06-28 5:49 ` jvdelisle at gcc dot gnu dot org
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-28 5:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2006-06-28 05:40 -------
Subject: Bug 19310
Author: jvdelisle
Date: Wed Jun 28 05:39:07 2006
New Revision: 115049
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115049
Log:
2006-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/19310
PR fortran/19904
* gfortran.dg/real_const_3.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/real_const_3.f90
Modified:
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/19310] [4.1 Only] unnecessary error for overflowing results
[not found] <bug-19310-9515@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2006-06-28 5:45 ` jvdelisle at gcc dot gnu dot org
@ 2006-06-28 5:49 ` jvdelisle at gcc dot gnu dot org
11 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-28 5:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2006-06-28 05:45 -------
Fixed in 4.1 now.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310
^ permalink raw reply [flat|nested] 12+ messages in thread