From 535536b45a85eca6749f813b75d46a9788e0781b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 7 Jul 2009 14:18:38 +0200 Subject: re PR middle-end/40669 (ICE in gimple_assign_set_rhs1 from eliminate_tail_call) PR middle-end/40669 * tree-tailcall.c (adjust_return_value_with_ops, create_tailcall_accumulator): Set DECL_GIMPLE_REG_P on the temporary if it has complex or vector type. * gcc.dg/pr40669.c: New test. From-SVN: r149319 --- gcc/tree-tailcall.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/tree-tailcall.c') diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 23d849f268e..f2d58dd6e4a 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -567,6 +567,9 @@ adjust_return_value_with_ops (enum tree_code code, const char *label, gimple stmt = gimple_build_assign_with_ops (code, tmp, op0, op1); tree result; + if (TREE_CODE (ret_type) == COMPLEX_TYPE + || TREE_CODE (ret_type) == VECTOR_TYPE) + DECL_GIMPLE_REG_P (tmp) = 1; add_referenced_var (tmp); result = make_ssa_name (tmp, stmt); gimple_assign_set_lhs (stmt, result); @@ -861,6 +864,9 @@ create_tailcall_accumulator (const char *label, basic_block bb, tree init) tree tmp = create_tmp_var (ret_type, label); gimple phi; + if (TREE_CODE (ret_type) == COMPLEX_TYPE + || TREE_CODE (ret_type) == VECTOR_TYPE) + DECL_GIMPLE_REG_P (tmp) = 1; add_referenced_var (tmp); phi = create_phi_node (tmp, bb); /* RET_TYPE can be a float when -ffast-maths is enabled. */ -- cgit v1.2.1