This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,fortran] Fix PR19310 unnecessary error for overflowing results


On Sun, Jun 11, 2006 at 04:44:35PM +0100, Paul Brook wrote:
> > > >>*************** gfc_range_check (gfc_expr * e)
> > > >>*** 555,560 ****
> > > >>--- 555,563 ----
> > > >> {
> > > >>   arith rc;
> > > >>
> > > >>+   if (gfc_option.flag_range_check == 0)
> > > >>+     return ARITH_OK;
> > > >>+
> > > >
> > > >This makes me nervous. I'd expect overflowed values to be set to +-Inf,
> > > >like  for we set underflowed values to zero.
> >
> > Jerry, I just realized that the above also disables range checking
> > for integer types.  This may be the cause of Paul's nervousness.
> > I think we want to continue range checking integers where Inf and
> > NaN don't apply.
> 
> Good point, I hadn't spotted that.
> However my concern was that we now have out-of-range real values, which could 
> cause bad things to happen later on.
> 

AFAIK, mpfr propagates inf and nan according to IEEE-754, so
the front-end should be okay.  I have insufficient knowledge
of what the middle-end and backend do with these values.
I did submit a PR 24581 about problems with C99's complex type
and these special values.  Joseph Meyer seems to disagree
with my analysis of the problem.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]