This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35719] New: pointer to zero sized array not associated
- From: "dick dot hendrickson at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Mar 2008 16:14:08 -0000
- Subject: [Bug fortran/35719] New: pointer to zero sized array not associated
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The ASSOCIATED function returns FALSE when its argument is a
pointer to a zero-sized array.
Dick Hendrickson
program try_mf1053
! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]
call mf1053 ( 1, 2, 3, 4)
end
SUBROUTINE MF1053 (nf1, nf2, nf3, nf4)
INTEGER, pointer :: ILA(:,:)
INTEGER, target :: ILA1(NF2,NF4:NF3)
ILA => ILA1
if (ASSOCIATED (ILA, ILA1(NF1:NF2,NF4:NF3) ) ) print *, "1 bad"
if ( .not. ASSOCIATED(ILA) ) print *, "2 bad"
END SUBROUTINE
C:\g_experiments\gfortran>gfortran mf1053.f
C:\g_experiments\gfortran>a
2 bad
--
Summary: pointer to zero sized array not associated
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dick dot hendrickson at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35719