https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121137
Bug ID: 121137 Summary: ICE on x86_64-linux-gnu: Segmentation fault with omp Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jiangchangwu at smail dot nju.edu.cn Target Milestone: --- Compiler Explorer: https://gcc.godbolt.org/z/b6scqTsTs ******************************************************************************* gcc version: Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/home/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --disable-multilib --disable-bootstrap --enable-languages=c,c++ --prefix=/home/software/gcc-trunk --enable-coverage --disable-werror --enable-checking=yes Thread model: posix Supported LTO compression algorithms: zlib gcc version 16.0.0 20250613 (experimental) (GCC) ******************************************************************************* Program: $ cat mutant.c void e(int c, struct {char a[c];} b) { int d; #pragma omp parallel reduction(+ : d) b; } ******************************************************************************* Command Lines: $ gcc -std=gnu17 -fopenmp mutant.c mutant.c:1:15: warning: anonymous struct declared inside parameter list will not be visible outside of this definition or declaration 1 | void e(int c, struct {char a[c];} b) { | ^~~~~~ mutant.c: In function 'e': mutant.c:4:3: internal compiler error: Segmentation fault 4 | b; | ^ 0x5554b38 internal_error(char const*, ...) ../../gcc/gcc/diagnostic-global-context.cc:517 0x21651ec crash_signal ../../gcc/gcc/toplev.cc:321 0x192e239 omp_add_variable ../../gcc/gcc/gimplify.cc:8626 0x1931a0a omp_notice_variable ../../gcc/gcc/gimplify.cc:9299 0x190bf4b gimplify_var_or_parm_decl ../../gcc/gcc/gimplify.cc:3354 0x1989d4b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.cc:20256 0x192d3dc gimplify_stmt(tree_node**, gimple**) ../../gcc/gcc/gimplify.cc:8461 0x19019d2 gimplify_bind_expr ../../gcc/gcc/gimplify.cc:1683 0x1987d70 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.cc:19990 0x192d3dc gimplify_stmt(tree_node**, gimple**) ../../gcc/gcc/gimplify.cc:8461 0x18fa5f2 gimplify_and_add(tree_node*, gimple**) ../../gcc/gcc/gimplify.cc:550 0x18fa674 gimplify_and_return_first ../../gcc/gcc/gimplify.cc:562 0x1963e05 gimplify_omp_parallel ../../gcc/gcc/gimplify.cc:16107 0x1989fd9 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.cc:20288 0x192d3dc gimplify_stmt(tree_node**, gimple**) ../../gcc/gcc/gimplify.cc:8461 0x19058ab gimplify_statement_list ../../gcc/gcc/gimplify.cc:2288 0x1989bd9 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.cc:20240 0x192d3dc gimplify_stmt(tree_node**, gimple**) ../../gcc/gcc/gimplify.cc:8461 0x19019d2 gimplify_bind_expr ../../gcc/gcc/gimplify.cc:1683 0x1987d70 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.cc:19990 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.