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

            Bug ID: 92084
           Summary: [10 Regression] ICE: tree check: expected tree that
                    contains 'decl minimal' structure, have
                    'compound_expr' in gimplify_scan_omp_clauses, at
                    gimplify.c:9039
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-10.0.0-alpha20191013 snapshot (r276943) ICEs when compiling the following
testcase reduced from libgomp/testsuite/libgomp.c-c++-common/task-reduction-5.c
w/ -std=c++17 -fopenmp:

void
vs (int *uj, int ct)
{
#pragma omp taskgroup task_reduction (* : uj[ct])
  ;
}

% g++-10.0.0-alpha20191013 -std=c++17 -fopenmp -c fwqikdxr.c
fwqikdxr.c: In function 'void vs(int*, int)':
fwqikdxr.c:4:9: internal compiler error: tree check: expected tree that
contains 'decl minimal' structure, have 'compound_expr' in
gimplify_scan_omp_clauses, at gimplify.c:9039
    4 | #pragma omp taskgroup task_reduction (* : uj[ct])
      |         ^~~
0x7665f6 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/tree.c:10098
0x6c3131 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/tree.h:3381
0x6c3131 gimplify_scan_omp_clauses
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/gimplify.c:9039
0xc1da3e gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/gimplify.c:13737
0xc2391e gimplify_stmt(tree_node**, gimple**)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/gimplify.c:6780
0xc2391e gimplify_body(tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/gimplify.c:14385
0xc23d60 gimplify_function_tree(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/gimplify.c:14529
0xab47e3 cgraph_node::analyze()
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/cgraphunit.c:667
0xab6dbd analyze_functions
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/cgraphunit.c:1126
0xab79ee symbol_table::finalize_compilation_unit()
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/cgraphunit.c:2840

It also ICEs at least w/:

libgomp.c++/task-reduction-11.C
libgomp.c++/task-reduction-12.C
libgomp.c++/task-reduction-13.C
libgomp.c++/task-reduction-17.C
libgomp.c++/task-reduction-18.C
libgomp.c++/task-reduction-19.C
libgomp.c++/task-reduction-4.C
libgomp.c++/task-reduction-5.C
libgomp.c++/task-reduction-6.C
libgomp.c++/task-reduction-7.C
libgomp.c++/taskloop-reduction-2.C
libgomp.c++/taskloop-reduction-3.C
libgomp.c++/taskloop-reduction-4.C
libgomp.c-c++-common/task-reduction-3.c
libgomp.c-c++-common/task-reduction-7.c
libgomp.c-c++-common/task-reduction-9.c
libgomp.c-c++-common/taskloop-reduction-2.c

Reply via email to