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

            Bug ID: 98186
           Summary: [9/10/11 Regression] ICE tree check: expected
                    omp_clause, have bit_cast_expr in tsubst_omp_clauses,
                    at cp/pt.c:17246
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Using testfiles pr94477.C or pr94512.C with option -O0
affects versions down to r9 :


$ g++-8           -c pr94477.C -fopenmp-simd -O0
$ g++-11-20201206 -c pr94477.C -fopenmp-simd -O2
$
$ g++-11-20201206 -c pr94477.C -fopenmp-simd -O0
during GIMPLE pass: ompexp
pr94477.C: In function 'void bar() [with int <anonymous> = 0]':
pr94477.C:6:30: internal compiler error: Segmentation fault
    6 |   #pragma omp parallel master
      |                              ^
0xc8881f crash_signal
        ../../gcc/toplev.c:327
0xefa77e build_call_expr_loc_array(unsigned int, tree_node*, int, tree_node**)
        ../../gcc/tree.c:11554
0x15d8f9e expand_parallel_call
        ../../gcc/omp-expand.c:732
0x15d8f9e expand_omp_taskreg
        ../../gcc/omp-expand.c:1485
0x15defbf expand_omp_synch
        ../../gcc/omp-expand.c:8453
0x15defbf expand_omp
        ../../gcc/omp-expand.c:9937
0x15e10ed execute_expand_omp
        ../../gcc/omp-expand.c:10133

---

pr94477.C: In instantiation of 'void bar() [with int <anonymous> = 0]':
pr94477.C:12:11:   required from here
pr94477.C:6:30: internal compiler error: tree check: expected omp_clause, have
bit_cast_expr in tsubst_omp_clauses, at cp/pt.c:17246
    6 |   #pragma omp parallel master
      |                              ^
0x64d58a tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.c:9810
0x8c05e7 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/tree.h:3335
0x8c05e7 tsubst_omp_clauses
        ../../gcc/cp/pt.c:17246
0x8b19b6 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:18536
0x8b1957 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:18022
0x8b32ff tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:18346
0x897ea5 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:18007
0x897ea5 instantiate_body
        ../../gcc/cp/pt.c:25665
0x89976f instantiate_decl(tree_node*, bool, bool)
        ../../gcc/cp/pt.c:25954
0x8da3fb instantiate_pending_templates(int)
        ../../gcc/cp/pt.c:26033
0x79441c c_parse_final_cleanups()
        ../../gcc/cp/decl2.c:4904

Reply via email to