public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113289] New: Error caused by attribute __always_inline__ in file waitpkgintrin.h
@ 2024-01-09 11:38 MacroModel at trajectronix dot onmicrosoft.com
2024-01-09 12:45 ` [Bug target/113289] Error caused by attribute __always_inline__ jakub at gcc dot gnu.org
2024-01-10 0:29 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: MacroModel at trajectronix dot onmicrosoft.com @ 2024-01-09 11:38 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/113289] Error caused by attribute __always_inline__
2024-01-09 11:38 [Bug c++/113289] New: Error caused by attribute __always_inline__ in file waitpkgintrin.h MacroModel at trajectronix dot onmicrosoft.com
@ 2024-01-09 12:45 ` jakub at gcc dot gnu.org
2024-01-10 0:29 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-09 12:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113289
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is a user error.
The _tpause intrinsic requires the caller to be compiled with -mwaitpkg, which
given the above error didn't happen.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/113289] Error caused by attribute __always_inline__
2024-01-09 11:38 [Bug c++/113289] New: Error caused by attribute __always_inline__ in file waitpkgintrin.h MacroModel at trajectronix dot onmicrosoft.com
2024-01-09 12:45 ` [Bug target/113289] Error caused by attribute __always_inline__ jakub at gcc dot gnu.org
@ 2024-01-10 0:29 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-10 0:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113289
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the improved diagnostic for the error message is PR 90798 (and PR 82094).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-10 0:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09 11:38 [Bug c++/113289] New: Error caused by attribute __always_inline__ in file waitpkgintrin.h MacroModel at trajectronix dot onmicrosoft.com
2024-01-09 12:45 ` [Bug target/113289] Error caused by attribute __always_inline__ jakub at gcc dot gnu.org
2024-01-10 0:29 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).