Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

code coverage for dpc++

KimBioInfoStudio
Employee
1,511 Views

when I try get code coverage of dpc++ code I find a error like,  i search and find a similar erorr https://community.intel.com/t5/Intel-C-Compiler/undefined-reference-to-intel-fast-memcpy-when-using-intrinsics/td-p/969564,   but seems libirc form icc, and idea on how to resolve this problem?

 

$echo "int main(){return 0;}" >> foo.cc
$clang++ -v -fprofile-arcs -ftest-coverage foo.cc -o foo
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/gta/20210607/build/linux_prod/compiler/linux/lib/clang/13.0.0/lib/linux/libclang_rt.profile-x86_64.a(GCDAProfiling.c.o): in function `llvm_gcda_start_file': GCDAProfiling.c:(.text.llvm_gcda_start_file+0x234): undefined reference to `_intel_fast_memset' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/gta/20210607/build/linux_prod/compiler/linux/lib/clang/13.0.0/lib/linux/libclang_rt.profile-x86_64.a(InstrProfilingUtil.c.o): in function `lprofApplyPathPrefix': InstrProfilingUtil.c:(.text.lprofApplyPathPrefix+0x55): undefined reference to `_intel_fast_memcpy' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: InstrProfilingUtil.c:(.text.lprofApplyPathPrefix+0x80): undefined reference to `_intel_fast_memcpy' clang++: error: linker command failed with exit code 1 (use -v to see invocation)

 

0 Kudos
3 Replies
VidyalathaB_Intel
Moderator
1,491 Views

Hi,

Thanks for reaching out to us.

We are working on this issue internally, we will get back to you soon.

Thanks & Regards,

Vidya.


0 Kudos
Varsha_M_Intel
Employee
1,453 Views

Please use the ICX driver instead of the clang++ driver.

For eg -

icx -fprofile-arcs -ftest-coverage codecov.cpp -o codecov




0 Kudos
Raj_Ranjan
Beginner
1,003 Views

I am also facing issue to get the codecoverage for FlexRAN codebase.
For ICC , i am using the below FLAGS but its not working(Compliation error) with ICX.
LD_FLAGS += -prof-gen:srcpos
CC_FLAGS :=  -prof-gen:srcpos


0 Kudos
Reply