Mixed source (C+Fortran) compilation
Jerry DeLisle
jvdelisle@charter.net
Fri Feb 3 18:53:00 GMT 2017
On 02/03/2017 07:57 AM, Richard Biener wrote:
> On February 3, 2017 12:06:34 PM GMT+01:00, ghime <ghime@live.com> wrote:
>> Dear Fortran users and developers,
>>
>> I've been brainstorming with some colleagues (in HPC for climate
>> sciences)
>> the idea of having a C compiler front-ends to accept inline Fortran
>> blocks,
>> much the same way they (most? all?) accept inline Assembly. There are
>> several reasons why this would be interesting, all of them boiling down
>> to
>> narrowing/erasing the gap between C and Fortran, both technical and
>> cultural. We are pitching this idea to members of the HPC community.
>> The
>> plan would be to have a proof-of-concept patch of gcc/gfortran.
>>
>> Some of the long-term consequences, if this ever becomes reality, would
>> be:
>>
>> - Mixed-source files would enable/force scientists to learn "that other
>> language".
>> - Integration would make it easier to achieve/enforce code uniformity
>> and
>> reduce duplications.
>> - Performance would be increased by having each language do what it
>> does
>> best without resorting to function calls.
>>
>> I'd like to hear peoples thoughts, preferably constructive ones. This
>> is not
>> something of which benefits would be reaped soon, yet not-soon can come
>> quite quickly in software development, if there is a will and a way. I
>> believe the way is quite well-paved in the current state of the gcc
>> compiler
>> suite.
I think this is a very bad bad idea. Do the C calls to the Fortran procedures in
the C program and let the compiler inline/optimize it. If the C frontend won't
do that then add the feature to the C frontend.
Jerry, ~IMHO
More information about the Fortran
mailing list