[Bug fortran/33276] [4.3 Regression] 465.tonto in SPEC CPU 2006 fails to compile
hjl at lucon dot org
gcc-bugzilla@gcc.gnu.org
Sat Sep 1 23:01:00 GMT 2007
------- Comment #2 from hjl at lucon dot org 2007-09-01 23:01 -------
In expand_iterator, there are
cleanup:
gfc_free_expr (start);
gfc_free_expr (end);
gfc_free_expr (step);
mpz_clear (trip);
mpz_clear (frame.value);
iter_stack = frame.prev;
return t;
}
But frame.prev may be uninitialized when one of goto cleanup is called.
This patch
--- gcc/fortran/array.c.foo 2007-08-01 17:14:30.000000000 -0700
+++ gcc/fortran/array.c 2007-09-01 15:57:03.000000000 -0700
@@ -1281,6 +1281,7 @@ expand_iterator (gfc_constructor *c)
mpz_init (trip);
mpz_init (frame.value);
+ frame.prev = NULL;
start = gfc_copy_expr (c->iterator->start);
if (gfc_simplify_expr (start, 1) == FAILURE)
seems to cure the ICE. Shouldn't gcc warn about this?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33276
More information about the Gcc-bugs
mailing list