This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33609] ICE on arithmetic overflow
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Oct 2007 18:04:03 -0000
- Subject: [Bug fortran/33609] ICE on arithmetic overflow
- References: <bug-33609-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2007-10-06 18:04 -------
The following fixes this:
Index: simplify.c
===================================================================
--- simplify.c (revision 129029)
+++ simplify.c (working copy)
@@ -70,6 +70,9 @@ gfc_expr gfc_bad_expr;
static gfc_expr *
range_check (gfc_expr *result, const char *name)
{
+ if (result == NULL)
+ return &gfc_bad_expr;
+
switch (gfc_range_check (result))
{
case ARITH_OK:
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33609