This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
frame.prev in expand_iterator may be uninitialized. 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 initializes frame.prev. Shouldn't gcc warn about this?
Cheers, - Tobi
H.J. --- 2007-09-01 H.J. Lu <hongjiu.lu@intel.com>
PR fortran/33276 * array.c (expand_iterator): Initialize frame.prev.
--- 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)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |