From a3fd80eade6e515fef7bce24e178dd4c986e6ae1 Mon Sep 17 00:00:00 2001 From: Toon Moene Date: Thu, 15 Dec 2011 18:26:02 +0000 Subject: re PR fortran/51310 (-finit-bla doesn't initialize *all* items of type bla to the requested constant.) 2011-12-15 Toon Moene 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 --- gcc/fortran/resolve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index b12efe0..e99e199 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -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 -- cgit v1.1