This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/40354] bug with procedure pointers and C interoperability



------- Comment #1 from kargl at gcc dot gnu dot org  2009-06-05 15:12 -------
Looks like a bug in ifort and g95.

  15.1.2.4   C FUNLOC (X)

  Description. Returns the C address of the argument.

  Class. Inquiry function.

  Argument. X shall either be a procedure that is interoperable,
            or a procedure pointer associated with an interoperable
            procedure.

sub1 isn't a procedure pointer, so everything after the 'or' is
irrelevant.  Now, for the 'either' portion of the above.

  15.2.6  Interoperability of procedures and procedure interfaces

  A Fortran procedure is interoperable if it has the BIND attribute,
  that is, if its interface is specified with a proc-language-binding-spec.

  R1225 proc-language-binding-spec is language-binding-spec

  R509  language-binding-spec is
        BIND (C [, NAME = scalar-char-initialization-expr ])

What do the experts on comp.lang.fortran think of your code?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40354


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