[Bug fortran/36761] Unallocated array "referenced" silently
jvdelisle at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Mar 30 01:02:00 GMT 2009
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2009-03-30 01:01 -------
The first right statement in the original test case is valid fortran and gives
the correct result.
The second write statement is invalid Fortran. An unallocated allocatable array
has no size. It is up to the programmer to use "allocated" to confirm that the
array has a size before using it. This is what allocated is for.
Therefore this gets down to the same issue as 20520, using an allocatable array
before it is allocated. This is regardless of how it is invalidly used, in an
arithmetic statement or a write statement. See comments I added 20 20520.
*** This bug has been marked as a duplicate of 20520 ***
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Keywords| |accepts-invalid
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36761
More information about the Gcc-bugs
mailing list