[Bug fortran/65585] Implicit allocation of unallocated array with an implicit summation
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Thu Mar 26 16:42:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65585
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
gfortran is behaving as expected: iamwild is allocated on assignment as stated
in the manual
-frealloc-lhs
An allocatable left-hand side of an intrinsic assignment is automatically
(re)allocated if it is either unallocated or has a different shape. The option
is enabled by default except when -std=f95 is given. See also -Wrealloc-lhs.
Note this apply to full arrays only, hence the segfault if you use iamwild(:)
and iamwild unallocated.
> PS: took me the day to understand why my code was not working with another
> compiler... :-/
If the "other compiler" is ifort, this behavior is not the default and has to
be set by some option.
More information about the Gcc-bugs
mailing list