http://bugzilla.gdcproject.org/show_bug.cgi?id=235
Bug ID: 235 Summary: ICE with array slice assign on 32 bit Product: GDC Version: development Hardware: x86 OS: All Status: NEW Severity: major Priority: Normal Component: gdc Assignee: ibuc...@gdcproject.org Reporter: johannesp...@gmail.com Found on ARM, reproducible on x86 (32bit) as well: char[] func1() { return []; } void test1() { func1()[] = 'y'; } gdc -c test7.d -m32 In d_build_call CALL_EXPR_RETURN_SLOT_OPT is set on 32 bit targets only and build_target_expr is called. in ExprVisitor::AssignExp we call d_save_expr on the result. For 32 bit targets is_lvalue_p returns true, as we have a TARGET_EXPR and not CALL_EXPR. Because of that we don't create a SAVE_EXPR. The codegen then somehow recursively accesses some expressions which causes the error below. Also "gdc -c test7.d -m32 -fdump-tree-original" does not work and enters an infinite loop. --------------------------------------------------------- test7.d: In function 'test1': test7.d:8:5: internal compiler error: in gimple_add_tmp_var, at gimplify.c:703 func1()[] = 'y'; ^ 0x9d16b9 gimple_add_tmp_var(tree_node*) ../../gcc-7-20160619/gcc/gimplify.c:703 0x9d9867 gimplify_target_expr ../../gcc-7-20160619/gcc/gimplify.c:5688 0x9d9867 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-7-20160619/gcc/gimplify.c:10803 0x9deb03 gimplify_compound_lval ../../gcc-7-20160619/gcc/gimplify.c:2195 0x9d5d4a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-7-20160619/gcc/gimplify.c:10386 0x9e8cfa gimplify_modify_expr ../../gcc-7-20160619/gcc/gimplify.c:4798 0x9d7b8a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-7-20160619/gcc/gimplify.c:10434 0x9daee6 gimplify_stmt(tree_node**, gimple**) ../../gcc-7-20160619/gcc/gimplify.c:5767 0x9d5e9b gimplify_statement_list ../../gcc-7-20160619/gcc/gimplify.c:1549 0x9d5e9b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-7-20160619/gcc/gimplify.c:10851 0x9daee6 gimplify_stmt(tree_node**, gimple**) ../../gcc-7-20160619/gcc/gimplify.c:5767 0x9dc135 gimplify_bind_expr ../../gcc-7-20160619/gcc/gimplify.c:1154 0x9d8045 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-7-20160619/gcc/gimplify.c:10633 0x9daee6 gimplify_stmt(tree_node**, gimple**) ../../gcc-7-20160619/gcc/gimplify.c:5767 0x9dbb01 gimplify_compound_expr ../../gcc-7-20160619/gcc/gimplify.c:5029 0x9e1ba7 gimplify_modify_expr_rhs ../../gcc-7-20160619/gcc/gimplify.c:4407 0x9e8b39 gimplify_modify_expr ../../gcc-7-20160619/gcc/gimplify.c:4757 0x9d7b8a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-7-20160619/gcc/gimplify.c:10434 0x9d7cce gimplify_target_expr ../../gcc-7-20160619/gcc/gimplify.c:5698 0x9d7cce gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-7-20160619/gcc/gimplify.c:10803 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://bugzilla.gdcproject.org> for instructions. -- You are receiving this mail because: You are watching all bug changes.