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

            Bug ID: 69267
           Summary: [cilkplus] ICE when calling a function with an empty
                    class as an argument
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ryan.burn at gmail dot com
  Target Milestone: ---

The below code generates this ICE:

prog.cc: In function 'void g()':
prog.cc:6:21: internal compiler error: in gimplify_expr, at gimplify.c:11058
   _Cilk_spawn f(A{});
                     ^

0x8cd198 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:11058
0x74a26a cilk_gimplify_call_params_in_spawned_fn(tree_node**, gimple**,
gimple**)
        /home/heads/gcc/gcc-source/gcc/c-family/cilk.c:796
0x6df107 cilk_cp_gimplify_call_params_in_spawned_fn
        /home/heads/gcc/gcc-source/gcc/cp/cp-gimplify.c:101
0x6e17b5 cp_gimplify_expr(tree_node**, gimple**, gimple**)
        /home/heads/gcc/gcc-source/gcc/cp/cp-gimplify.c:755
0x8c9c75 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:10023
0x8cd336 gimplify_stmt(tree_node**, gimple**)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:5616
0x8ca548 gimplify_cleanup_point_expr
        /home/heads/gcc/gcc-source/gcc/gimplify.c:5392
0x8ca548 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:10479
0x8cd336 gimplify_stmt(tree_node**, gimple**)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:5616
0x8cb082 gimplify_and_add(tree_node*, gimple**)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:425
0x8cb082 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:10453
0x8cd336 gimplify_stmt(tree_node**, gimple**)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:5616
0x8cb98b gimplify_statement_list
        /home/heads/gcc/gcc-source/gcc/gimplify.c:1526
0x8cb98b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:10531
0x8cd336 gimplify_stmt(tree_node**, gimple**)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:5616
0x8ce586 gimplify_body(tree_node*, bool)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:11245
0x8ce8f7 gimplify_function_tree(tree_node*)
        /home/heads/gcc/gcc-source/gcc/gimplify.c:11401
0x7b0057 cgraph_node::analyze()
        /home/heads/gcc/gcc-source/gcc/cgraphunit.c:625
0x7b2a7f analyze_functions
        /home/heads/gcc/gcc-source/gcc/cgraphunit.c:1080
0x7b3258 symbol_table::finalize_compilation_unit()
        /home/heads/gcc/gcc-source/gcc/cgraphunit.c:2531
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

////////////////////////////////////////////////////////////////////////
struct A {};

void f(A) {}

void g() {
  _Cilk_spawn f(A{});
}

int main() {
  return 0;
}
////////////////////////////////////////////////////////////////////////

Reply via email to