re PR tree-optimization/57190 (verify_ssa failed: SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set)

2013-05-07  Richard Biener  <rguenther@suse.de>

	PR middle-end/57190
	* tree-eh.c (sink_clobbers): Properly propagate
	SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

	* g++.dg/torture/pr57190.C: New testcase.

From-SVN: r198675
This commit is contained in:
Richard Biener 2013-05-07 11:23:39 +00:00 committed by Richard Biener
parent ba7e83f8dc
commit 0a1a83cba3
4 changed files with 58 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-05-07 Richard Biener <rguenther@suse.de>
PR middle-end/57190
* tree-eh.c (sink_clobbers): Properly propagate
SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
2013-05-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/57149

View File

@ -1,3 +1,8 @@
2013-05-07 Richard Biener <rguenther@suse.de>
PR middle-end/57190
* g++.dg/torture/pr57190.C: New testcase.
2013-05-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/57149

View File

@ -0,0 +1,42 @@
// { dg-do compile }
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
template<typename _Tp> class new_allocator {
};
}
namespace std {
template<typename> class allocator;
template<class _CharT> struct char_traits;
template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string;
typedef basic_string<char> string;
template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> {
};
template<typename _CharT, typename _Traits, typename _Alloc> class basic_string {
public:
basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
};
}
class UIException {
};
class PasswordDialog {
void run() throw (UIException);
};
class MessageBox {
public:
MessageBox (std::string t) throw (UIException);
virtual int run() throw (UIException) ;
};
extern "C" {
struct __jmp_buf_tag {
};
extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) throw ();
typedef struct __jmp_buf_tag sigjmp_buf[1];
}
sigjmp_buf password_dialog_sig_jmp_buf;
void PasswordDialog::run() throw (UIException)
{
__sigsetjmp (password_dialog_sig_jmp_buf, 1);
MessageBox* errmsg = __null;
errmsg = new MessageBox ("E R R O R");
errmsg->run();
}

View File

@ -3401,6 +3401,11 @@ sink_clobbers (basic_block bb)
FOR_EACH_IMM_USE_STMT (use_stmt, iter, vuse)
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, gimple_vdef (stmt));
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vuse))
{
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_vdef (stmt)) = 1;
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vuse) = 0;
}
/* Adjust the incoming virtual operand. */
SET_USE (PHI_ARG_DEF_PTR_FROM_EDGE (vphi, succe), gimple_vuse (stmt));
SET_USE (gimple_vuse_op (stmt), vuse);