https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120861

            Bug ID: 120861
           Summary: ICE on x86_64-linux-gnu: tree check: expected tree
                    that contains 'decl minimal' structure, have
                    'error_mark' in remap_type_1, at tree-inline.cc:564
           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/xM3nfPET7

*******************************************************************************
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
int a, c;
void d() {
  typedef struct {
    char e[a];
  } f;
  f b;
#pragma omp parallel for
  for (c = 0; c < 8; c++)
    b;
}

*******************************************************************************
Command Lines:
$ gcc -fopenmp mutant.c
during GIMPLE pass: omplower
mutant.c: In function 'd':
mutant.c:7:9: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'error_mark' in remap_type_1, at
tree-inline.cc:564
    7 | #pragma omp parallel for
      |         ^~~
0x5554b38 internal_error(char const*, ...)
        ../../gcc/gcc/diagnostic-global-context.cc:517
0x2961e1f tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../gcc/gcc/tree.cc:9276
0xec7c27 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/gcc/tree.h:3857
0x22af026 remap_type_1
        ../../gcc/gcc/tree-inline.cc:564
0x22b0aa0 remap_type(tree_node*, copy_body_data*)
        ../../gcc/gcc/tree-inline.cc:714
0x22ad5df remap_type_1
        ../../gcc/gcc/tree-inline.cc:458
0x22b0aa0 remap_type(tree_node*, copy_body_data*)
        ../../gcc/gcc/tree-inline.cc:714
0x22acc31 remap_type_1
        ../../gcc/gcc/tree-inline.cc:426
0x22b0aa0 remap_type(tree_node*, copy_body_data*)
        ../../gcc/gcc/tree-inline.cc:714
0x1d4d3db fixup_remapped_decl
        ../../gcc/gcc/omp-low.cc:909
0x1d55f8d scan_sharing_clauses
        ../../gcc/gcc/omp-low.cc:1847
0x1d5a798 scan_omp_parallel
        ../../gcc/gcc/omp-low.cc:2374
0x1d6854d scan_omp_1_stmt
        ../../gcc/gcc/omp-low.cc:4177
0x18f6101 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.cc:618
0x18f32bc walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.cc:51
0x18f6634 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.cc:681
0x18f32bc walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.cc:51
0x18f6367 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.cc:645
0x18f32bc walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.cc:51
0x1d692f5 scan_omp
        ../../gcc/gcc/omp-low.cc:4322
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.
  • [Bug c/120861] New: ICE ... jiangchangwu at smail dot nju.edu.cn via Gcc-bugs

Reply via email to