3

Is there an equivalent to Gcc's inline assembly in Gfortran?

__asm__ __volatile__ (...)

I cannot find anything in the gfortran man page, or the manual.

user3510167
  • 303
  • 3
  • 8

1 Answers1

3

No, there isn't. The easiest way around it is to have a C function with the asm, and then call that C function with ISO_C_BINDING.

janneb
  • 36,249
  • 2
  • 81
  • 97
  • Thanks for the information; we're actually fiddling with a specint test case written in fortran and suspect a performance problem due to stack layout on a certain machine (using Gfortran). But it seems to be futile to try modifying stack addreasses from within the source code. Maybe I'll just do it in the assembler sources. – user3510167 Jun 10 '15 at 10:19