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: C interop in gfortran.


yes, that would be me.  i've been swamped here the last couple months, so 
my progress has slowed.  however, i'm working on the steps necessary to 
get the code submitted for review.  most of section 15 seems to be 
working; a quick overview of the main parts that seem to work: 
	- the use of the c interop kinds (well, most of them.  haven't 
	tested them all, and the special chars aren't complete.  i did 
	handle the c_null_char, since that seemed most useful, and 
	int/real/c_ptr types).
	- the function for mapping c to fortran pointers. 
	- the sharing of c interop types between fortran and c (as args, 
	globals, and including derived types), common blocks..
	- the bind(c) feature for procedures, global vars, common blocks, 
	- pass by value for primitive types and derived types.  this isn't 
	exactly C interop, since fortran routines can do pass by value to 
	fortran routines also (which i find quite nice).
	- procedure decl statements (more specifically, the statements 
	that use an interface-name to define the signature of the named 
	procedures).  proc pointers do NOT work yet..

that seems fairly complete and accurate.  i've done a fair amount of 
testing of the individual features, and they seem to work fine.  some of 
the things such as the pass-by-value and proc decl stmts will definitely 
need more testing.  the proc decl stmts will also need to be completed, 
since i've only handled a small portion of it for now.  but, i am hoping 
to submit the code i have for review before finishing this.  i've been 
trying to clean up the code and get it to conform to the gnu required 
coding style, since i didn't program in this style at all doing this work.

i've updated my svn as of yesterday, and reg tested my modified version 
and didn't see any difference in passes/expected failures/unhandled tests 
from the unmodified gfortran.

again, sorry for the delays.  i've been enjoying the ease of the f03 c 
interop for a while, and it's very useful.

Chris	


On Fri, 14 Apr 2006, Toon Moene wrote:

> L.S.,
> 
> I distinctly had the impression that *someone* was working on getting section
> 15 of the Fortran 2003 Standard (Interoperability with C) implemented in
> gfortran.
> 
> However, I can't find a trace of it in my inbox.
> 
> Am I hallucinating ?
> 
> Thanks for any insight ...
> 
> -- 
> Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
> Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
> A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/
> My next laptop will be pedal-powered
> 


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