<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 11, 2016, at 11:31 AM, Zaak Beekman <<a href="mailto:zbeekman@gmail.com" class="">zbeekman@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So if I require Fortran 2003 for our fortran codes then this whole ?fortran name-mangling? thing becomes a moot point, i.e. I do not have to actually worry about it at all for our project. Just have to keep the C header consistent with the FORTRAN functions, but that part is on our devs.<br class=""></blockquote><div class=""><br class=""></div><div class="">Exactly, that is the whole point of the standardized `ISO_C_BINDING` module and C interop being added to the Fortran 2003 standard. No more ugly guess work, hackery, etc.</div><div class=""><br class=""></div><div class="">AFAIK, there is pretty good support for this among compiler vendors, so long as you have a recent release. </div></div></div></div></blockquote><div><br class=""></div>Even as far back as about five years ago, all 10 compilers surveyed by Ian Chivers and Jane Sleightholme supported C interoperability.  And now there are at least four compilers that even support the _additional_ C interoperability features in the draft Fortran 2015 standard: the IBM, Cray, Intel, and GNU compilers.  C interoperability appears to be one of the first things every compiler team tackles from a new standard.</div><div><br class=""></div><div>Anyone with access to ACM Fortran Forum will benefit from consulting the standards-support survey that Ian and Jane have published in almost every issue for roughly a decade or so.  Standards support in  Fortran compilers is not quite where it needs to be, but it’s much better than it was even just a couple of years ago. Great strides have been taken.</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">I know for sure GCC's gfortran and Intel's ifort support this very well. I'm pretty sure PGI, Cray and IBM support it too. I have never used NAG, so I withhold comment there, but I'd be surprised if they had yet to add this to their compiler. The demand for C interop is really high, and almost all of these companies make companion C compilers, so, in my experience, they have been relatively quick to implement these features, while some other Fortran 2003 and later features have languished. (I'm looking at you, parameterized derived types…)</div></div></div></div></blockquote><div><br class=""></div>PDT is one of the few Fortran 2003 features for which support is still a bit limited, but it is supported by at lest four compilers: IBM, Cray, Intel, and Portland Group, all of which are fully Fortran 2003 compliant.  I would bet that NAG will have it soon and GNU will likely have it in their development branch sometime later this year.  A developer has already put a great deal of work into scoping out the effort.  PDTs are a monster to implement in a compiler.</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class="">P.S. Unless you want to sound like an old geezer, it's spelled Fortran these days, not FORTRAN. ;-)</div></div></div></div></blockquote><div><br class=""></div>And the standard has spelled it in mixed case at least since Fortran 90 so, in addition to being dated, spelling FORTRAN in all-caps is non-standard. </div><div><br class=""></div><div>:D</div><div><br class=""></div></body></html>