Functions returning pointers

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Mon Aug 23 11:11:00 GMT 2004


Paul Brook wrote:
>>Fix below, as you suggested off-list.
> 
> 
> You should know better than to believe what I tell you ;-)

OK, you're no longer my infallible Guru! :-)

> This condition should be
> if (sym->attr.pointer && !(se->want_pointer || byref))
> 
> Incomplete testcase:
> program assignment_2
>   character, target :: t
>   character, pointer :: p
> 
>   p = f()
> contains
> function f()
>   character, pointer :: f
>   f => t
> end function
> end program
> 

Unfortunately, it doesn't work this way. Nothing from the tree dumps strikes
me as an obvious mistake right now, but I'll see if I can find out what goes
wrong.

> It also makes sense to test the warning.

Agreed.

- Tobi



More information about the Fortran mailing list