[gfortran] PR 14077

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Fri Jul 9 21:56:00 GMT 2004


And another one, in PR14077 we would fail when reading a module where we
initialize only parts of an array. Since I could see no reason to put a
variables initialization in a module, unless we're dealing with a
parameter, I just made us stop i/o-ing those values.

If there's a case where we need this, please tell me, and add a testcase :-)

Built and tested on i686-pc-linux.

- Tobi

2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

	PR fortran/14077
	* module.c (mio_symbol); Don't I/O initial values unless if
	symbol is a parameter.

Index: module.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/module.c,v
retrieving revision 1.9
diff -u -p -r1.9 module.c
--- module.c    9 Jul 2004 14:53:38 -0000       1.9
+++ module.c    9 Jul 2004 20:50:28 -0000
@@ -2675,7 +2675,9 @@ mio_symbol (gfc_symbol * sym)

   mio_formal_arglist (sym);

-  mio_expr (&sym->value);
+  if (sym->attr.flavor == FL_PARAMETER)
+    mio_expr (&sym->value);
+
   mio_array_spec (&sym->as);

   mio_symbol_ref (&sym->result);



More information about the Fortran mailing list