http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45793

--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-26 
03:39:17 UTC ---
This patch untested gets rid of the valgrind error I was seeing.

Index: module.c
===================================================================
--- module.c    (revision 164621)
+++ module.c    (working copy)
@@ -5313,7 +5313,6 @@ create_int_parameter_array (const char *name, int
 {
   gfc_symtree *tmp_symtree;
   gfc_symbol *sym;
-  gfc_expr *e;

   tmp_symtree = gfc_find_symtree (gfc_current_ns->sym_root, name);
   if (tmp_symtree != NULL)
@@ -5342,8 +5341,8 @@ create_int_parameter_array (const char *name, int
   sym->as->upper[0] = gfc_get_int_expr (gfc_default_integer_kind, NULL, size); 

   sym->value = value;
-  e->shape = gfc_get_shape (1);
-  mpz_init_set_ui (e->shape[0], size);
+  sym->value->shape = gfc_get_shape (1);
+  mpz_init_set_ui (sym->value->shape[0], size);
 }

Can someone familiar with module.c see if this makes sense for the intended
purpose.  I will start regression testing.

Reply via email to