Please consider this trivial code snippet, which does nothing else but generate a backtrace:
program tb use ifcore call TRACEBACKQQ end
Compiling this with ifort 18 using the -traceback flag yields the expected result:
$ ./a.out
Image PC Routine Line Source
a.out 0000000000404391 Unknown Unknown Unknown
a.out 0000000000400AA4 MAIN__ 5 backtrace.f90
a.out 0000000000400A4E Unknown Unknown Unknown
a.out 000000000048B636 Unknown Unknown Unknown
a.out 000000000048B82A Unknown Unknown Unknown
a.out 0000000000400929 Unknown Unknown Unknown
However, when adding the -static-libgcc flag on a Linux system, the backtrace completely disappears and the program does not produce any output. I observed this not only for an explicit call to TRACEBACKQQ, but also for runtime errors, which usually give a backtrace as well (but not with -static-libgcc). Interestingly a fully statically linked executable (using the -static flag) gives backtraces without any problem.
Is is somehow expected that -static-libgcc kills my backtraces, or can this be considered an ifort bug? The documentation does not seem to mention anything in this direction:
https://software.intel.com/en-us/fortran-compiler-18.0-developer-guide-a...
https://software.intel.com/en-us/fortran-compiler-18.0-developer-guide-a...
Cheers,
Janus