Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28510 Discussions

Linking errors when using memory sanitizer in fortran project

ogmundur
Beginner
825 Views

When I use the check uninit option in a large, mixed language (fortran and C) project with the new ifx driver I get a huge amount of the following linking errors:

 

undefined reference to `__msan_chain_origin'

 

with references to numerous other routines from the memory sanitizer all beginning with __msan. If I turn the uninit check off, the project compiles and links successfully.

I am using ifx version 2023.2.0. I am using CMake, which automatically selects ifx to link the executable.

Should I be passing further options to the linker, so that it finds the memory sanitzer routines?

0 Kudos
1 Solution
Barbara_P_Intel
Moderator
806 Views

When you compile with -check uninit (or -check all) you also need to link with that compiler option.

 

View solution in original post

2 Replies
Barbara_P_Intel
Moderator
807 Views

When you compile with -check uninit (or -check all) you also need to link with that compiler option.

 

ogmundur
Beginner
764 Views
0 Kudos
Reply