- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When attempting to use __builtin_expect_with_probability (after checking for support using __has_builtin(__builtin_expect_with_probability), icc seems to think it is a regular function, which causes a failure at link time. Here is a quick test case:
#if defined(__has_builtin)
# define MY_HAS_BUILTIN(builtin) __has_builtin(builtin)
#else
# define MY_HAS_BUILTIN(builtin) (0)
#endif
bool foo(bool bar) {
#if MY_HAS_BUILTIN(__builtin_expect_with_probability)
return __builtin_expect_with_probability(bar, true, 0.99);
#else
return __builtin_expect(bar, true);
#endif
}
Or, on godbolt if you prefer: https://godbolt.org/z/4rxqqaGqr
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
We are able to reproduce the error and we are working on it. We will get back to you soon.
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Not sure if you are aware of, but Intel Classic Compiler will enter "Legacy Product Support" mode, signaling the end of regular updates. For that reason, we won't fix this issue in icpc. Please migrate your code to icx/icpx.
I am going to close this thread as "wont fix".
Sorry for the inconvenience.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page