https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38959
--- Comment #4 from Peter Cordes <peter at cordes dot ca> --- The __builtin_ia32_rdpmc being a pure function bug I mentioned in my previous comment is already reported and fixed (in gcc9 only): bug 87550 It was present since at least gcc 5.0 https://software.intel.com/en-us/forums/software-tuning-performance-optimization-platform-monitoring/topic/595214