https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82926
--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> --- The testcase violates redzone. Either add rsp to the list of clobbered registers, or compile with -fno-red-zone. OTOH, you should just include <cpuid.h> and use __cpuid.