[Bug fortran/35719] New: pointer to zero sized array not associated
dick dot hendrickson at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 27 16:14:00 GMT 2008
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
More information about the Gcc-bugs
mailing list