This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Problem with procedure pointers
>>> Can anyone shed some light on this?
>>
>> AFAICS, your program is invalid in two aspects, both of which gfortran
>> fails to detect:
>>
>> 1) Printing variables of a derived type with PPCs is forbidden. There
>> was a recent PR about this (PR47768) and I thought we had it fixed.
>
> Ok, this one is simple: We fail to write the attribute
> 'PROC_POINTER_COMP' to the module file!
With the attached patch, your program is rejected with:
write(*,*) rect
1
Error: Data transfer element at (1) cannot have procedure pointer components
The patch is rather trivial. Is it sensible to apply this to 4.6
still, or should I wait until 4.7?
Cheers,
Janus