This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30834] ICE with kind=8 exponentiaton
- From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2007 21:49:34 -0000
- Subject: [Bug fortran/30834] ICE with kind=8 exponentiaton
- References: <bug-30834-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from sgk at troutmask dot apl dot washington dot edu 2007-02-19 21:49 -------
Subject: Re: ICE with kind=8 exponentiaton
On Mon, Feb 19, 2007 at 09:11:45PM -0000, tkoenig at gcc dot gnu dot org wrote:
>
> >Feel free to create a gfc_extract_long_long and document that
> > e is constrained to be within [LONG_LONG_MIN, LONG_LONG_MAX].
>
> Suppose we don't simplify if gfc_extract_int fails. Would that
> cause anything bad (like an ICE further down thr road)?
>
gfc_arith_power is expected to return one of ARITH_OK, ARITH_OVERFLOW,
ARITH_UNDERFLOW, ARITH_NAN, ARITH_DIV0, ARITH_INCOMMENSURATE, or
ARITH_ASYMMETRIC. We would need to prevent the call to gfc_arith_power
in the special case of e not in [INT_MIN, INT_MAX]. A quick grep
shows that gfc_arith_power is called from gfc_power, and
laptop:kargl[261] grep gfc_power *c
arith.c:gfc_power (gfc_expr *op1, gfc_expr *op2)
expr.c: result = gfc_power (op1, op2);
matchexp.c: r = gfc_power (e, exp);
A glance at expr.c and matchexp.c suggests that a change to
potentially call one of libgfortran's pow_* function would
be nontrivial.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30834