PR 36322/36463

Dominique Dhumieres dominiq@lps.ens.fr
Thu Oct 23 21:06:00 GMT 2008


Janus,

You have been faster than me to reduce the problem!
There is a last one with the following reduced test:

module other_fun
   use ISO_C_BINDING
   implicit none
   private
end module other_fun

program fptr
!   use ISO_C_BINDING
   use other_fun
   implicit none
   type(C_FUNPTR) fp
end program fptr

which gives

pr35971_red_1.f90:11.17:

   type(C_FUNPTR) fp
                1
Error: Derived type 'c_funptr' at (1) is being used before it is defined

If I comment 'private' of if I uncomment the 'use ISO_C_BINDING' in
the program, the error disappears. I have no idea if this the way it
is supposed to work: does 'private' prevent 'ISO_C_BINDING' to be
associated in the program?

Dominique



More information about the Fortran mailing list