This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 36322/36463


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]