diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-07-07 14:18:38 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-07-07 14:18:38 +0200 |
commit | 535536b45a85eca6749f813b75d46a9788e0781b (patch) | |
tree | c0b534b32dc3bd0d1d076a32a3e3b7e55e52912e /gcc/tree-tailcall.c | |
parent | d79e621af27fbd5306aea9d5ce8d1c2f95b55db5 (diff) | |
download | gcc-535536b45a85eca6749f813b75d46a9788e0781b.tar.gz |
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
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r-- | gcc/tree-tailcall.c | 6 |
1 files changed, 6 insertions, 0 deletions
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. */ |