Commit a3fd80ea by Toon Moene Committed by Toon Moene

re PR fortran/51310 (-finit-bla doesn't initialize *all* items of type bla to…

re PR fortran/51310 (-finit-bla doesn't initialize *all* items of type bla to the requested constant.)

2011-12-15  Toon Moene  <toon@moene.org>

	PR fortran/51310
	* resolve.c (build_default_init_expr): Allow non-allocatable,
	non-compile-time-constant-shape arrays to have a default
	initializer.
	* invoke.texi: Delete the restriction on automatic arrays not

From-SVN: r182384
parent fb38bcf4
2011-12-15 Toon Moene <toon@moene.org>
PR fortran/51310
* resolve.c (build_default_init_expr): Allow non-allocatable,
non-compile-time-constant-shape arrays to have a default
initializer.
* invoke.texi: Delete the restriction on automatic arrays not
2011-12-15 Tobias Burnus <burnus@net-b.de>
PR fortran/51550
......
......@@ -1474,8 +1474,6 @@ the real and imaginary parts of local @code{COMPLEX} variables),
value) options. These options do not initialize
@itemize @bullet
@item
automatic arrays
@item
allocatable arrays
@item
components of derived type variables
......
......@@ -9900,7 +9900,7 @@ build_default_init_expr (gfc_symbol *sym)
int i;
/* These symbols should never have a default initialization. */
if ((sym->attr.dimension && !gfc_is_compile_time_shape (sym->as))
if (sym->attr.allocatable
|| sym->attr.external
|| sym->attr.dummy
|| sym->attr.pointer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment