Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Intel C++ Classic x86 intrinsic function _InterlockedCompareExchangePointer unresolved

PSK1
Novice
1,799 Views

Hi

OS : Windows 10, X64
Intel C++ 2021.1.3 Classic
Target : X86

I discovered that _InterlockedCompareExchangePointer is unresolved external in target X86 (but works fine in X64), Here is how to reproduce (silly example) in target x32

#include <iostream>
#include <intrin.h>

int main()
{

void* a1, * a2= nullptr, * a3 = nullptr;
_InterlockedCompareExchangePointer(&a1, a2, a3);

}

Is intrinsic in x32 broken?

0 Kudos
1 Solution
Viet_H_Intel
Moderator
1,589 Views

Hi,


Our Developer decided not to fix this issue. Please use icx instead.

We are going to close this thread as wont fix.

Thanks,


View solution in original post

0 Kudos
5 Replies
ArpitaP_Intel
Moderator
1,766 Views

Hi Peter,

 

Thanks for reaching out to us.

 

We tried the code snippet at our end using Intel oneAPI 2021.2 and 2021.3. We found it runs fine for both x86 and x64 on Windows 10 using the C++ compiler.

 

Can you please consider working on latest version of Intel oneAPI i.e. 2021.3? Let us know if issue persists.

 

Thanks!

 

0 Kudos
PSK1
Novice
1,750 Views

Thank you for your reply

I regretfully didn't clarify compiler version, but it was the latest, 2021.3

I am still getting unresolved external on this intrinsic
I attach a command line compile of this small example. All version information is also shown
Using same example using X64 target does not produce this error, as I show in attachment
Would you please have a look at it again?

0 Kudos
ArpitaP_Intel
Moderator
1,717 Views

Hi Peter,


We were able to reproduce the same issue with the icl compiler.

We are working on your issue internally. We will get back to you soon.

Meanwhile could you please try compiling your code with icx compiler instead of icl.


Thanks!



0 Kudos
Viet_H_Intel
Moderator
1,698 Views

Thank for reporting this issue. I've filed this bug to our Developer.


0 Kudos
Viet_H_Intel
Moderator
1,590 Views

Hi,


Our Developer decided not to fix this issue. Please use icx instead.

We are going to close this thread as wont fix.

Thanks,


0 Kudos
Reply