https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117268
Bug ID: 117268
Summary: [14 Regression] GCC target("general-regs-only") leaves
__AVX__ defined after a push_options/pop_options
'scope'
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
Target Milestone: ---
Godbolt: https://godbolt.org/z/c99oj8xv3
tl;dr:
#undef __AVX__
// from gcc/x86_64-poky-linux/14.2.0/include/x86gprintrin.h
#pragma GCC push_options
#pragma GCC target("general-regs-only")
#pragma GCC pop_options
#ifdef __AVX__
#error avx defined again
#endif
Compile with -O2 -m64 -march=x86-64-v3
With 13.3, compiles fine. With 14.2 and trunk, errors.