public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100584] New: [modules] ICE when using import <thread>; with std::jthread
@ 2021-05-13 11:15 andreemalcher at gmail dot com
2022-10-12 9:36 ` [Bug c++/100584] " redi at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: andreemalcher at gmail dot com @ 2021-05-13 11:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100584
Bug ID: 100584
Summary: [modules] ICE when using import <thread>; with
std::jthread
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: andreemalcher at gmail dot com
Target Milestone: ---
$ cat thread.cpp
import <iostream>; // Compiles & runs fine with include or if order if swapped
with next line
#include <thread>
int main() {
std::jthread t{[]{}}; // Compiles & runs fine with std::thread
}
$ g++ -fmodules-ts -std=c++20 -c -x c++-system-header iostream$ g++
-fmodules-ts -std=c++20 -o prog thread.cpp -pthread
during IPA pass: visibility
thread.cpp:6:1: internal compiler error: in function_and_variable_visibility,
at ipa-visibility.c:712
6 | }
| ^
0x1702697 internal_error(char const*, ...)
???:0
0x64082b fancy_abort(char const*, int, char const*)
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
If you replace std::jthread with std::thread (optionally, with corresponding
join()), it compiles just fine.
Also, the order of import vs. include seems to matter (see comment in code).
Same ICE for import <string>;, for example, but not for import <vector>;.
Haven't tried others.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/100584] [modules] ICE when using import <thread>; with std::jthread
2021-05-13 11:15 [Bug c++/100584] New: [modules] ICE when using import <thread>; with std::jthread andreemalcher at gmail dot com
@ 2022-10-12 9:36 ` redi at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-12 9:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100584
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |visibility
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is fixed in GCC 11.3 and later, but probably only because we no longer use
weak symbols for pthreads functions, since r11-9301-g293075002a7eaf
The compiler bug is probably still present, and this is almost certainly a dup
of PR 106820
*** This bug has been marked as a duplicate of bug 106820 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-12 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 11:15 [Bug c++/100584] New: [modules] ICE when using import <thread>; with std::jthread andreemalcher at gmail dot com
2022-10-12 9:36 ` [Bug c++/100584] " redi 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).