Bug 25709 - BIND (Fortran 2003) is not supported at all
Summary: BIND (Fortran 2003) is not supported at all
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: F2003
  Show dependency treegraph
 
Reported: 2006-01-07 05:15 UTC by Andrew Pinski
Modified: 2007-07-02 16:44 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-01-07 18:02:49


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2006-01-07 05:15:45 UTC
For more information see http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlf101a.doc/xlflr/bindc-attr.htm

(Note I am starting to like XLF's manual).
Comment 1 kargls 2006-01-07 06:05:49 UTC
Please, do not use non-standard documents!  You can get a copy
of the Final Committee Draft of the Fortran 2003 standard from
the J3 web site (or you can ask me to send you a copy).  Vendors
tend to interpret the standard in a manner that suits their needs.
Comment 2 kargls 2006-01-07 17:39:16 UTC
BTW, this feature is actively being worked upon.  See
http://gcc.gnu.org/ml/fortran/2005-12/msg00270.html
Comment 3 Janne Blomqvist 2006-01-07 18:02:49 UTC
Confirmed
Comment 4 Janne Blomqvist 2006-05-25 20:44:14 UTC
Seems this work is getting closer: http://gcc.gnu.org/ml/fortran/2006-04/msg00173.html

I'm adding this bug as blocking 27740, as before taking symbol versioning into use, it would be nice to clean up the library interface; in particular making all exported symbols have the _gfortran_ prefix. As the Fortran language doesn't allow procedure names to begin with an underscore, and parts of libgfortran are written in Fortran, the C binding could rescue us here as we could do

function foo(a,b,c) bind(c,name='_gfortran_foo')
Comment 5 Tobias Burnus 2006-12-18 10:04:18 UTC
This feature is now part of the "fortran-experiments" branch, available at:
svn://gcc.gnu.org/svn/gcc/branches/fortran-experiments
Comment 6 kargls 2007-07-02 16:44:44 UTC
I committed a patch, yesterday.