[Bug fortran/35745] Divide incorrectly extracted from WHERE block?; run time abort
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 28 22:05:00 GMT 2008
------- Comment #1 from burnus at gcc dot gnu dot org 2008-03-28 22:05 -------
Confirm.
Valgrind shows:
Process terminating with default action of signal 8 (SIGFPE): dumping core
Integer divide by zero at address 0x40274EADB
at 0x4008C6: MAIN__ (ghfhgk.f90:15)
> Divide incorrectly extracted from WHERE block?
Yes and no. The compiler essentially transforms (as -fdump-tree-original shows)
WHERE (RDA < -15.0)
IDA = 1/NF0 + 2
ENDWHERE
into
TMP = 1/NF0 + 2
WHERE (RDA < -15.0)
IDA = TMP
ENDWHERE
which is the reason for the integer divide by zero and shows that moving
constant expressions out of a loop is not always a good idea.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2008-03-28 22:05:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35745
More information about the Gcc-bugs
mailing list