diff options
author | Richard Guenther <rguenther@suse.de> | 2006-07-17 08:04:25 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-07-17 08:04:25 +0000 |
commit | 2b65dae54e6e0eb0a30d645d516a7006d50e321b (patch) | |
tree | 0b1589a866d7d8f6ffa994b2f8e67db942d248ff /gcc/tree-inline.c | |
parent | 2a50edcd0f5cca974fe82b27a1b109618afa1a05 (diff) | |
download | gcc-2b65dae54e6e0eb0a30d645d516a7006d50e321b.zip gcc-2b65dae54e6e0eb0a30d645d516a7006d50e321b.tar.gz gcc-2b65dae54e6e0eb0a30d645d516a7006d50e321b.tar.bz2 |
re PR tree-optimization/28238 (verify_stmts failed (invalid operand to unary operator))
2006-07-17 Richard Guenther <rguenther@suse.de>
PR tree-optimization/28238
* tree-inline.c (copy_bb): Check if we produced valid
gimple copying and substituting a stmt. If not, gimplify
it.
* g++.dg/tree-ssa/pr28238.C: New testcase.
From-SVN: r115517
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 4749be5..92d85a8 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -704,6 +704,14 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, int count_scal if (stmt) { tree call, decl; + + /* With return slot optimization we can end up with + non-gimple (foo *)&this->m, fix that here. */ + if (TREE_CODE (stmt) == MODIFY_EXPR + && TREE_CODE (TREE_OPERAND (stmt, 1)) == NOP_EXPR + && !is_gimple_val (TREE_OPERAND (TREE_OPERAND (stmt, 1), 0))) + gimplify_stmt (&stmt); + bsi_insert_after (©_bsi, stmt, BSI_NEW_STMT); call = get_call_expr_in (stmt); /* We're duplicating a CALL_EXPR. Find any corresponding |