diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-02-08 21:07:56 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-02-08 21:07:56 +0100 |
commit | a162f3af802f4f3dab5a53e6864600e6c38582d7 (patch) | |
tree | ef6b66eb6433bac1e4c69b34ec97beabd712d21c /gcc/ipa-split.c | |
parent | 4b4a9fbde878d5db993466606c277c827117cbdf (diff) | |
download | gcc-a162f3af802f4f3dab5a53e6864600e6c38582d7.zip gcc-a162f3af802f4f3dab5a53e6864600e6c38582d7.tar.gz gcc-a162f3af802f4f3dab5a53e6864600e6c38582d7.tar.bz2 |
re PR tree-optimization/69209 (ICE at -Os and above on x86_64-linux-gnu (verify_gimple failed))
PR tree-optimization/69209
* ipa-split.c (split_function): If split part is not
returning retval, retval has gimple type but is not
gimple value, force it into a SSA_NAME first.
* gcc.c-torture/compile/pr69209.c: New test.
From-SVN: r233228
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 9ecc282..929119a 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1628,8 +1628,22 @@ split_function (basic_block return_bb, struct split_point *split_point, gimple_call_set_lhs (call, build_simple_mem_ref (retval)); else gimple_call_set_lhs (call, retval); + gsi_insert_after (&gsi, call, GSI_NEW_STMT); + } + else + { + gsi_insert_after (&gsi, call, GSI_NEW_STMT); + if (retval + && is_gimple_reg_type (TREE_TYPE (retval)) + && !is_gimple_val (retval)) + { + gassign *g + = gimple_build_assign (make_ssa_name (TREE_TYPE (retval)), + retval); + retval = gimple_assign_lhs (g); + gsi_insert_after (&gsi, g, GSI_NEW_STMT); + } } - gsi_insert_after (&gsi, call, GSI_NEW_STMT); /* Build bndret call to obtain returned bounds. */ if (retbnd) chkp_insert_retbnd_call (retbnd, retval, &gsi); |