This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38918] New: compile time error for DATA of NULL() to pointer structure component
- 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: 19 Jan 2009 22:17:33 -0000
- Subject: [Bug fortran/38918] New: compile time error for DATA of NULL() to pointer structure component
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following program gives a compile time error for a DATA assignment of
NULL() to a structure component. Probably related to 38917
Dick Hendrickson
SUBROUTINE PF0009
! fails on Windows XP
! gcc version 4.4.0 20081219 (experimental) [trunk revision 142842] (GCC)
TYPE :: HAS_POINTER
INTEGER, POINTER :: PTR_S
END TYPE HAS_POINTER
TYPE (HAS_POINTER) :: PTR_ARRAY(5)
DATA PTR_ARRAY(1)%PTR_S /NULL()/
end subroutine pf0009
C:\gfortran>gfortran try_pf0009.f
try_pf0009.f:11.38:
DATA PTR_ARRAY(1)%PTR_S /NULL()/
1
Error: NULL appears on right-hand side in assignment at (1)
--
Summary: compile time error for DATA of NULL() to pointer
structure component
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=38918