https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103468
Bug ID: 103468 Summary: [modules] ICE Segmentation fault during GIMPLE pass walloca Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-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: --- my.std.headers.hpp: ```c++ #include <algorithm> #include <cstddef> ``` my.std.cpp: ```C++ export module my.std; export import "my.std.headers.hpp"; ``` test.cpp: ```C++ import my.std; int main() { std::byte *b{}; std::copy(b, b, b); } ``` Compile commands: ``` g++ -pedantic -Wall -Wextra -Wconversion -g -fmodules-ts -std=c++23 -x c++-header -c my.std.headers.hpp g++ -pedantic -Wall -Wextra -Wconversion -g -fmodules-ts -std=c++23 -c my.std.cpp g++ -pedantic -Wall -Wextra -Wconversion -g -fmodules-ts -std=c++23 -c test.cpp ``` Output: ``` during GIMPLE pass: walloca In file included from /home/johel/root/gcc/include/c++/12.0.0/algorithm:60, from my.std.headers.hpp:1, of module ./my.std.headers.hpp, imported at my.std.cpp:3, of module my.std, imported at test.cpp:1: /home/johel/root/gcc/include/c++/12.0.0/bits/stl_algobase.h: In static member function ‘static constexpr _OI std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m(_II, _II, _OI) [with _II = std::byte*; _OI = std::byte*]’: /home/johel/root/gcc/include/c++/12.0.0/bits/stl_algobase.h:380:9: internal compiler error: Segmentation fault 380 | __copy_m(_II __first, _II __last, _OI __result) | ^~~~~~~~ 0x2140f6d internal_error(char const*, ...) ???:0 0xed8190 irange::set_varying(tree_node*) ???:0 0x14f2d91 gimple_range_global(tree_node*) ???:0 0x1f21f7b ranger_cache::get_global_range(irange&, tree_node*) const ???:0 0x1f1ecdb gimple_ranger::export_global_ranges() ???:0 0x1f5de40 pass_walloca::execute(function*) ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://bugs.archlinux.org/> for instructions. ```