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: IMPORT or C Binding bug?




On Thu, 28 Jun 2007, Steve Kargl wrote:

On Thu, Jun 28, 2007 at 03:28:08PM -0600, Christopher D. Rickett wrote:
i don't think the problem has anything to do with C binding.  for example,
the following simplified code behaves the same:


I agree with your analysis. I found PR 31154 after I posted the code. BTW, I posted a call for real-world codes using ICB on comp.lang.fortran. I've gotten a few responses so I trying to break your patch :-)

thanks for the testing. i'll nervously wait to see what bugs get reported back and hope it's only a few. :-)


One response stated:

  I hope gfortran implementation of ISO_C_BINDING permits the use of
  private components in a derived type with BIND(C) attribute (to my
  best knowledge g95 doesn't ).

In a recent discussion, Richard Maine clarified that

"a derived type with the BIND(C) attribute"

  1) is allowed to be a "PRIVATE type" and/or
  2) is allowed to be a type with "PRIVATE" components.

  The second one is used in the above Pthread Interface implementation
  (which makes perfect sense).

I checked your testsuite codes (with a quick glance) and could not
find anything that matches this description.  Should we add a few
more tests?

i'm pretty sure this will be allowed by gfortran -- i can't think of anything i did to prevent it. i don't think the public/private attribute for type components was implemented yet in gfortran when i did the bind(c) work, so adding more tests now would probably be good.


Chris


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