Reconstruct interface from .mod and .o files

In theory yes, but it may not be easy. You’ll need to refer to the documentation of the format of the .mod files for your compiler (if any is available). It must contain the interfaces for anything that is public from that module. Probably could contain some other stuff.

As for the object file, if you recompile and get exactly the same object file, then you’re good. That should be the case for “equivalent” source code compiled with the same options. Equivalent would include same variable names and order of operations, but should be independent of format.

You could also try a decompiler, but I don’t know of what exists out there for Fortran.

1 Like