Software Archive
Read-only legacy content
17061 Discussions

New Compiler Bug was introduced for MIC offload

Clothoid
Beginner
452 Views

When using the latest Intel C++ compiler 14.0 SP1 Update 1, i noticed that a new bug was introduced for MIC offload code.

When compiling code that is just intended for MIC and that does not work on the host (e.g. code that uses MIC intrinsics), one can mark that code as

#ifdef __MIC__

.... C++ intrinsics code

#endif

However, when doing this in a .cpp file so that the host code contains nothing, also the MIC code is not generated.

A hack to avoid this issue is to add C++ code that does nothing of purpose, but at least something at all. So a workaround would be e.g.

#ifdef __MIC__

.... C++ intrinsics code

#else

static int i = 0;

#endif

I assume that this is a new bug that was introduced - or was there any special purpose for enforcing nonempty host code in a .cpp file?

0 Kudos
1 Reply
Kevin_D_Intel
Employee
452 Views

Looks like this was accidently duplicated in this later post: http://software.intel.com/en-us/forums/topic/486650. I closed this instance out and will report my findings in the later post.

0 Kudos
Reply