[Bug fortran/20863] Pointer problems in PURE procedures
brooks at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Oct 12 00:07:00 GMT 2006
------- Comment #2 from brooks at gcc dot gnu dot org 2006-10-12 00:07 -------
On a similar note, the following is legal code for which an error is
incorrectly reported:
>> $ cat pr20863a.f90
>> PURE FUNCTION give_next(i)
>> TYPE node_type
>> sequence
>> TYPE(node_type), POINTER :: next
>> END TYPE
>> TYPE(node_type), POINTER :: node
>> TYPE(node_type), target :: t
>> integer, intent(in) :: i
>> node%next = t
>> END FUNCTION
>>
>> THOMASP@PC-THOMAS-P /cygdrive/d/svn/prs
>> $ /irun/bin/gfortran -c pr20863a.f90
>> In file pr20863a.f90:9
>>
>> node%next = t
>> 1
>> Error: Right side of assignment at (1) is a derived type containing a
>> POINTER in a PURE procedure
See discussion here for details:
http://gcc.gnu.org/ml/fortran/2006-10/msg00340.html
--
brooks at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |brooks at gcc dot gnu dot
| |org
Keywords| |rejects-valid
Summary|Pointer of host-associated |Pointer problems in PURE
|type in PURE procedure |procedures
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20863
More information about the Gcc-bugs
mailing list