This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38822] Compile-time simplification of x**(real) / ICE in in gfc_target_encode_expr
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2009 16:33:43 -0000
- Subject: [Bug fortran/38822] Compile-time simplification of x**(real) / ICE in in gfc_target_encode_expr
- References: <bug-38822-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2009-01-13 16:33 -------
The problem is the following in arith.c:
if (op == INTRINSIC_POWER && op2->ts.type != BT_INTEGER)
goto runtime;
Thus it is only run-time evaluated. gfc_arith_power deals so far only with
(numeric_type)**(integer). We need to handle (complex)**(complex)
and (real)**(real).
I think Fortran 2003 allows ** in initialization expressions (at least I could
not find anything else) and thus one needs this. See also PR 38823.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE in in |Compile-time simplification
|gfc_target_encode_expr |of x**(real) / ICE in in
| |gfc_target_encode_expr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38822