This PR was a dup of PR82264, but the testcases differ, because this one
crashes with -O2, and it's C++.

Tested on x86_64-linux, ok for trunk?

2017-12-19  Marek Polacek  <pola...@redhat.com>

        PR tree-optimization/83482
        * g++.dg/torture/pr83482.C: New test.

--- gcc/testsuite/g++.dg/torture/pr83482.C
+++ gcc/testsuite/g++.dg/torture/pr83482.C
@@ -0,0 +1,18 @@
+// PR tree-optimization/83482
+// { dg-do compile }
+
+void _setjmp(int);
+void a();
+class b {
+public:
+  virtual long c() { return 0L; }
+  void m_fn2() { c(); }
+} d;
+void e() {
+  d.m_fn2();
+  try {
+    a();
+    _setjmp(0);
+  } catch (...) {
+  }
+}

        Marek

Reply via email to