https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119864
Alberto <alberto.gcc.bugzilla at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alberto.gcc.bugzilla@gmail. | |com --- Comment #6 from Alberto <alberto.gcc.bugzilla at gmail dot com> --- Hello This issue also affects the std module as it has "declare reduction" clauses to support the unseq execution policy. For example, the program: ``` hello.cpp import std; int main() { std::vector<int> v; } ``` compiled with: g++ -std=c++23 -fmodules -fopenmp-simd -fsearch-include-path bits/std.cc hello.cpp -o hello.out causes g++ to crash: hello.cpp: In function 'void omp declare reduction __min_func(_ComplexType&)': hello.cpp:5:8: internal compiler error: Segmentation fault 5 | std::vector<int> v; | ^~~~~~ 0x2287465 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x22989b6 internal_error(char const*, ...) ???:0 0xfd2b06 relayout_decl(tree_node*) ???:0 0xc740ee allocate_struct_function(tree_node*, bool) ???:0 0x9011e1 module_state::read_cluster(unsigned int) ???:0 0x901a7d module_state::load_section(unsigned int, binding_slot*) ???:0 0x901b28 module_state::lazy_load(unsigned int, binding_slot*) ???:0 0x900fc3 module_state::read_cluster(unsigned int) ???:0 0x901a7d module_state::load_section(unsigned int, binding_slot*) ???:0 0x901b28 module_state::lazy_load(unsigned int, binding_slot*) ???:0 0x900fc3 module_state::read_cluster(unsigned int) ???:0 0x901a7d module_state::load_section(unsigned int, binding_slot*) ???:0 0x901c30 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*) ???:0 0x91479e name_lookup::search_namespace_only(tree_node*) ???:0 0x914998 name_lookup::search_namespace(tree_node*) ???:0 0x914ae7 name_lookup::search_qualified(tree_node*, bool) ???:0 0x9180a7 lookup_qualified_name(tree_node*, tree_node*, LOOK_want, bool) ???:0 0x981ebd c_parse_file() ???:0 0xa8b739 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.