Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Internal compiler error on GCC with modules

Đang mở
#2,148 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
cpp
Lĩnh vực
compilers

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi với Test.cpp, GCC 16.1.1, -std=c++26 và -fmodules, sau đó so sánh kết quả với Clang. Kiểm tra lỗi tại dòng 177 của __query.hpp và mối liên hệ với #2139; công việc được xem là hoàn tất khi đã xác định được liệu stdexec hay GCC chịu trách nhiệm và đã ghi lại một fix, workaround hoặc upstream report đã được xác nhận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
C++
Star
2.4k
Fork
274
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
38

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/stdexec

Tất cả issue của NVIDIA/stdexec

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.