https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113289
Bug ID: 113289 Summary: Error caused by attribute __always_inline__ in file waitpkgintrin.h Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: MacroModel at trajectronix dot onmicrosoft.com Target Milestone: --- gcc -v ```bash Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=G:/x86_64-w64-mingw32/bin/../libexec/gcc/x86_64-w64-mingw32/14.0.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: /home/cqwrteur/toolchains_build/gcc/configure --with-gxx-libcxx-include-dir=/home/cqwrteur/toolchains/x86_64-w64-mingw32/x86_64-w64-mingw32/include/c++/v1 --prefix=/home/cqwrteur/toolchains/x86_64-w64-mingw32/x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-nls --disable-werror --enable-languages=c,c++ --enable-multilib --disable-bootstrap --disable-libstdcxx-verbose --with-libstdcxx-eh-pool-obj-count=0 --disable-sjlj-exceptions --enable-libstdcxx-threads --enable-libstdcxx-backtrace Thread model: win32 Supported LTO compression algorithms: zlib gcc version 14.0.0 20231231 (experimental) (GCC) ``` When I was compiling tbb(https://github.com/oneapi-src/oneTBB), I encountered the following issues: ```bash G:\x86_64-w64-mingw32\bin\x86_64-w64-mingw32-g++ -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Ofast -std=c++20 -Ithird_party\tbb\include -finput-charset=UTF-8 -fexec-charset=UTF-8 -flto -DNDEBUG -o build\.objs\tbb\mingw\x86_64\release\third_party\tbb\src\tbb\misc.cpp.obj third_party\tbb\src\tbb\misc.cpp error: In file included from G:/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/14.0.0/include/x86gprintrin.h:95, from G:/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/14.0.0/include/x86intrin.h:27, from G:/x86_64-w64-mingw32/include/intrin.h:69, from third_party\tbb\include/oneapi/tbb/detail/_machine.h:29, from third_party\tbb\include/oneapi/tbb/detail/_utils.h:27, from third_party\tbb\src\tbb\task_dispatcher.h:20, from third_party\tbb\src\tbb\arena.cpp:17: G:/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/14.0.0/include/waitpkgintrin.h: In function 'tbb::detail::r1::prolonged_pause()': G:/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/14.0.0/include/waitpkgintrin.h:53:1: error: inlining failed in call to 'always_inline' '_tpause': target specific option mismatch 53 | _tpause (unsigned int __A, unsigned long long __B) | ^~~~~~~ In file included from third_party\tbb\src\tbb\task_dispatcher.h:24: third_party\tbb\src\tbb\scheduler_common.h:248:16: note: called from here 248 | _tpause(0, time_stamp + 1000); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ G:/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/14.0.0/include/waitpkgintrin.h:53:1: error: inlining failed in call to 'always_inline' '_tpause': target specific option mismatch 53 | _tpause (unsigned int __A, unsigned long long __B) | ^~~~~~~ third_party\tbb\src\tbb\scheduler_common.h:248:16: note: called from here 248 | _tpause(0, time_stamp + 1000); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ G:/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/14.0.0/include/waitpkgintrin.h:53:1: error: inlining failed in call to 'always_inline' '_tpause': target specific option mismatch 53 | _tpause (unsigned int __A, unsigned long long __B) | ^~~~~~~ third_party\tbb\src\tbb\scheduler_common.h:248:16: note: called from here 248 | _tpause(0, time_stamp + 1000); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ``` I found that the file issue occurred in G:\x86_64-w64-mingw32\lib\gcc\x86_64-w64-mingw32\14.0.0\include\waitpkgintrin.h , line 52. When I removed the attribute __always_inline__, the compilation was successful.