https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118876
Bug ID: 118876 Summary: [15 Regression][OpenMP] ICE on valid code Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, openmp Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- omptests/xt-declare-target-ctors/test.cpp: In function ‘void __tcfsd(void*)’: omptests/xt-declare-target-ctors/test.cpp:103:5: internal compiler error: in add_stmt, at cp/semantics.cc:551 103 | SSD sd[3]; | ^~ 0x28a93cf internal_error(char const*, ...) gcc/diagnostic-global-context.cc:517 0xabbf21 fancy_abort(char const*, int, char const*) gcc/diagnostic.cc:1722 0x86906e add_stmt(tree_node*) gcc/cp/semantics.cc:551 0xba6c55 register_dtor_fn(tree_node*) gcc/cp/decl.cc:10494 0xbb26b7 one_static_initialization_or_destruction gcc/cp/decl2.cc:4518 * * * The assert is at: /* Add T to the statement-tree. Non-side-effect statements need to be recorded during statement expressions. */ gcc_checking_assert (!stmt_list_stack->is_empty ()); I am not completely sure whether that's a true regression as it is a gcc_checking_assert. An educated guess, only, is that it has been caused by r15-2799-gf1bfba3a9b3f31 OpenMP: Constructors and destructors for "declare target" static aggregates which would make it a GCC 15 regression (and unsupported in GCC 14). * * * The unreduced test case is at https://github.com/doru1004/omptests/blob/main/xt-declare-target-ctors/test.cpp#L103