https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110894
Bug ID: 110894 Summary: [modules] Program terminates with signal SIGSEGV Product: gcc Version: 14.0 URL: https://cpp2.godbolt.org/z/7YrvenrzT Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- Please, see <https://cpp2.godbolt.org/z/7YrvenrzT>. It has the source files, and in the output, the compile commands along with the errors. ``` $ cat module.cpp module; #include <string> export module hello; export auto hello() -> std::string { return "Hello"; } $ cat main.cpp #include <iostream> import hello; auto main() -> int { std::cout << hello() << ", modules!\n"; } ``` ``` [1/6] /opt/compiler-explorer/clang-16.0.0/bin/clang-scan-deps -format=p1689 -- /opt/compiler-explorer/gcc-snapshot/bin/g++ -O0 -std=c++2b -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -isystem /opt/compiler-explorer/gcc-snapshot/bin/../lib/gcc/x86_64-linux-gnu/14.0.0/include -x c++ /app/module.cpp -c -o CMakeFiles/main.dir/module.cpp.o -MT CMakeFiles/main.dir/module.cpp.o.ddi -MD -MF CMakeFiles/main.dir/module.cpp.o.ddi.d > CMakeFiles/main.dir/module.cpp.o.ddi [2/6] /opt/compiler-explorer/clang-16.0.0/bin/clang-scan-deps -format=p1689 -- /opt/compiler-explorer/gcc-snapshot/bin/g++ -O0 -std=c++2b -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -isystem /opt/compiler-explorer/gcc-snapshot/bin/../lib/gcc/x86_64-linux-gnu/14.0.0/include -x c++ /app/main.cpp -c -o CMakeFiles/main.dir/main.cpp.o -MT CMakeFiles/main.dir/main.cpp.o.ddi -MD -MF CMakeFiles/main.dir/main.cpp.o.ddi.d > CMakeFiles/main.dir/main.cpp.o.ddi [3/6] /opt/compiler-explorer/cmake-v3.26.1/bin/cmake -E cmake_ninja_dyndep --tdi=CMakeFiles/main.dir/CXXDependInfo.json --lang=CXX --modmapfmt=gcc --dd=CMakeFiles/main.dir/CXX.dd @CMakeFiles/main.dir/CXX.dd.rsp [4/6] /opt/compiler-explorer/gcc-snapshot/bin/g++ -O0 -std=c++2b -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -MD -MT CMakeFiles/main.dir/module.cpp.o -MF CMakeFiles/main.dir/module.cpp.o.d -fmodules-ts -Mno-modules -fmodule-mapper=CMakeFiles/main.dir/module.cpp.o.modmap -x c++ -o CMakeFiles/main.dir/module.cpp.o -c /app/module.cpp [5/6] /opt/compiler-explorer/gcc-snapshot/bin/g++ -O0 -std=c++2b -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -MD -MT CMakeFiles/main.dir/main.cpp.o -MF CMakeFiles/main.dir/main.cpp.o.d -fmodules-ts -Mno-modules -fmodule-mapper=CMakeFiles/main.dir/main.cpp.o.modmap -x c++ -o CMakeFiles/main.dir/main.cpp.o -c /app/main.cpp [6/6] : && /opt/compiler-explorer/gcc-snapshot/bin/g++ -O0 -std=c++2b -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -L/app -Wl,-rpath,/app -Wl,-rpath,/opt/compiler-explorer/gcc-snapshot/lib64 -Wl,-rpath,/opt/compiler-explorer/gcc-snapshot/lib32 CMakeFiles/main.dir/main.cpp.o CMakeFiles/main.dir/module.cpp.o -o main && : Program returned: 139 Program terminated with signal: SIGSEGV ```