Your Fortran application can perform interlanguage calls
to routines written in a language other than Fortran.
The guidelines assume that you are familiar with the syntax of
all applicable languages.
Conventions for XL Fortran external names
To assist you in writing mixed-language programs, XL Fortran follows
a consistent set of rules when translating the name of a global entity
into an external name that the linker can resolve.
Mixed-language input and output
To improve performance, the XL Fortran runtime
library has its own buffers and its own handling of these buffers.
This means that mixed-language programs cannot freely mix I/O operations
on the same file from the different languages.
Mixing Fortran and C++
When mixing Fortran and C++ in the same program,
you need to invoke the C++ compiler to correctly link the final program.
Making calls to C functions work
When you pass an argument to a subprogram call, the usual Fortran convention
is to pass the address of the argument. Many C functions expect arguments
to be passed as values, however, not as addresses.
Assembler-level subroutine linkage conventions
The subroutine linkage convention specifies the machine
state at subroutine entry and exit, allowing routines that are compiled
separately in the same or different languages to be linked.
Prolog and epilog
You need to consider a number of steps when entering a procedure
and when exiting a procedure.
Traceback In 64–bit mode, the compiler
supports the traceback mechanism, which symbolic debuggers need to
unravel the call or return stack. Each object module has a traceback
table in the text segment at the end of its code. This table contains
information about the object module, including the type of object
module, as well as stack frame and register information.