2013-05-07 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 May 2013 11:23:39 +0000 (11:23 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 May 2013 11:23:39 +0000 (11:23 +0000)
PR middle-end/57190
* tree-eh.c (sink_clobbers): Properly propagate
SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198675 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr57190.C [new file with mode: 0644]
gcc/tree-eh.c

index 00a5502..879c024 100644 (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
index 23e900c..d7c5046 100644 (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
diff --git a/gcc/testsuite/g++.dg/torture/pr57190.C b/gcc/testsuite/g++.dg/torture/pr57190.C
new file mode 100644 (file)
index 0000000..9fa11cd
--- /dev/null
@@ -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();
+}
index cbd878c..fb6fd86 100644 (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);