------- Comment #1 from burnus at gcc dot gnu dot org 2008-08-27 20:30 ------- call proc4( p ) should transfer to the tree code as proc4(&p) (procpointer passed by reference) but it is actually proc(p) The latter is OK for a PROCEDURE dummy argument but nor for a PROCEDURE POINTER dummy argument.
I know we came across the pass-by-refence issue before when implementing procpointers (cf. proc_ptr_7.f90). Why does not not work in this case? In proc_ptr_7.f90 we have: procedure(Integer(c_int)), pointer :: ptr call foo(ptr) with subroutine foo(a) procedure(integer(c_int)), pointer :: a which produces: foo (&ptr); What is different here? * * * I think there is some issue with saving the information in the module. If one moves proc4 to the main program (via contains) then it work, i.e. the procpointer information is lost. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37253