Commit bd422c4a by Richard Guenther Committed by Richard Biener

re PR tree-optimization/45056 (ICE: in refs_may_alias_p_1, at tree-ssa-alias.c:1023)

2010-07-26  Richard Guenther  <rguenther@suse.de>

	PR middle-end/45056
	* gimple-fold.c (fold_stmt_1): Also fold references in
	debug stmts.

	* g++.dg/pr45056.C: New testcase.

From-SVN: r162536
parent e093ffe3
2010-07-26 Richard Guenther <rguenther@suse.de>
PR middle-end/45056
* gimple-fold.c (fold_stmt_1): Also fold references in
debug stmts.
2010-07-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45071
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Always
adjust op->opcode.
......
......@@ -1530,6 +1530,23 @@ fold_stmt_1 (gimple_stmt_iterator *gsi, bool inplace)
}
break;
case GIMPLE_DEBUG:
if (gimple_debug_bind_p (stmt))
{
tree val = gimple_debug_bind_get_value (stmt);
if (val
&& REFERENCE_CLASS_P (val))
{
tree tem = maybe_fold_reference (val, false);
if (tem)
{
gimple_debug_bind_set_value (stmt, tem);
changed = true;
}
}
}
break;
default:;
}
......
2010-07-26 Richard Guenther <rguenther@suse.de>
PR middle-end/45056
* g++.dg/pr45056.C: New testcase.
2010-07-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45071
* gcc.dg/pr45071.c: New testcase.
......
/* { dg-do compile } */
/* { dg-options "-O -fschedule-insns2 -fschedule-insns -g" } */
template < class _T1, class _T2 > struct pair
{
_T1 first;
_T2 second;
pair (_T1 & __a, _T2 & __b)
:first (__a), second (__b)
{ }
}
;
template < typename _Tp > struct _Vector_base
{
~_Vector_base ();
}
;
template < typename _Tp>struct vector
: _Vector_base < _Tp>
{
template < typename _ForwardIterator > inline void _Destroy (_ForwardIterator) { }
_Tp * _M_finish;
~vector ()
{
_Destroy ( this->_M_finish);
}
} ;
template < typename ITV > struct Box
{
Box (const Box &);
Box ();
typedef vector < ITV > Sequence;
Sequence seq;
};
template < typename D > struct Powerset
{
Powerset (const Powerset &y) :reduced (y.reduced) {}
bool reduced;
} ;
template < typename PS > struct Pointset_Powerset :Powerset < int >
{
Pointset_Powerset ();
int space_dim;
} ;
pair
<
Box<int>,
Pointset_Powerset < int > >
linear_partition ()
{
Pointset_Powerset < int > r ;
Box<int> qq;
return pair<Box<int>,Pointset_Powerset < int > > (qq, r);
}
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