Commit 2b65dae5 by Richard Guenther Committed by Richard Biener

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
parent 2a50edcd
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.
2006-07-16 Eric Botcazou <ebotcazou@adacore.com> 2006-07-16 Eric Botcazou <ebotcazou@adacore.com>
* optabs.c (maybe_encapsulate_block): New function extracted from... * optabs.c (maybe_encapsulate_block): New function extracted from...
......
2006-07-17 Richard Guenther <rguenther@suse.de>
PR tree-optimization/28238
* g++.dg/tree-ssa/pr28238.C: New testcase.
2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28250 PR c++/28250
/* { dg-do compile } */
/* { dg-options "-O" } */
struct iterator{};
struct ByteIterator : iterator
{
ByteIterator (){}
int a[1024];
};
inline ByteIterator f ()
{
return ByteIterator ();
}
class ConfLexerCore
{
ConfLexerCore ();
ByteIterator m_matchStart;
};
ConfLexerCore::ConfLexerCore ()
: m_matchStart (f ())
{ }
...@@ -704,6 +704,14 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, int count_scal ...@@ -704,6 +704,14 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, int count_scal
if (stmt) if (stmt)
{ {
tree call, decl; 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 (&copy_bsi, stmt, BSI_NEW_STMT); bsi_insert_after (&copy_bsi, stmt, BSI_NEW_STMT);
call = get_call_expr_in (stmt); call = get_call_expr_in (stmt);
/* We're duplicating a CALL_EXPR. Find any corresponding /* We're duplicating a CALL_EXPR. Find any corresponding
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment