Repository navigation
Open
Description
When trying to compile the library with any modules on GCC (specifically GCC 16.1.1), I get an internal compiler error. For example, the following program Test.cpp
#include <stdexec/execution.hpp>
import std;
int main() {
std::println("Hello, world!");
}with the command g++ Test.cpp -o Test -std=c++26 -fmodules, I get this error:
In file included from /usr/include/stdexec/__detail/__env.hpp:22,
from /usr/include/stdexec/__detail/__debug.hpp:22,
from /usr/include/stdexec/__detail/__completion_signatures_of.hpp:21,
from /usr/include/stdexec/__detail/__as_awaitable.hpp:24,
from /usr/include/stdexec/execution.hpp:22,
from Test.cpp:1:
/usr/include/stdexec/__detail/__query.hpp:177:39: internal compiler error: Segmentation fault
177 | inline constexpr forwarding_query_t forwarding_query{};
| ^~~~~~~~~~~~~~~~
0x1929892 internal_error(char const*, ...)
???:0
0x1a3e403 duplicate_decls(tree_node*, tree_node*, bool, bool)
???:0
0x1beeb37 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**)
???:0
0x278bb31 c_parse_file()
???:0
0x2761230 c_common_parse_file()
???:0
/usr/lib/gcc/x86_64-pc-linux-gnu/16/cc1plus -quiet -D_GNU_SOURCE Test.cpp -quiet -dumpdir Test- -dumpbase Test.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -std=c++26 -fmodules -o /tmp/ccLyV9c4.s
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://github.com/CachyOS/CachyOS-PKGBUILDS/issues> for instructions.This doesn't seem to happen on Clang, and perhaps this issue is better reported directly upstream on GCC (which I'm not really sure how to do), but I do think this is worth pointing out as the library is basically unusable on GCC with modules on my end.
This is in particular a problem because it also prevents any work on providing the stdexec library as a module (see #2139).
Reacted by Refvalue, Konrad Nowak and peter-joo
Metadata
Metadata
Assignees
Labels
No labels
Activity
refvalue commentedon Jul 27, 2026
I am encountering the exact same Internal Compiler Error (Segmentation fault) at
forwarding_query.hpp:177on Windows / MinGW-w64 (GCC 16.1.1, MCF-UCRT).It happens regardless of whether
-freflectionis enabled, and even if<stdexec/execution.hpp>is included inside a Global Module Fragment (module;) in a module interface file (.ixx).MinGW Environment:
x86_64-w64-mingw32, MCF threads, UCRT)g++ -std=c++26 -fmodules-ts -c service_builder.ixxBacktrace location: