re PR tree-optimization/38632 (ICE with try/catch and -ftree-parallelize-loops)
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 12 May 2009 00:09:17 +0000 (00:09 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 12 May 2009 00:09:17 +0000 (17:09 -0700)
2009-05-11  H.J. Lu  <hongjiu.lu@intel.com>

PR tree-optimization/38632
* g++.dg/tree-ssa/pr38632.C: New.

From-SVN: r147401

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr38632.C [new file with mode: 0644]

index f0f45fc2fa3d5c15b3b22e375092a57857ad4901..b6b0949c3de90f00f73853aa323383e50dee1915 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR tree-optimization/38632
+       * g++.dg/tree-ssa/pr38632.C: New.
+
 2009-05-11  Jan Hubicka  <jh@suse.cz>
 
        * gcc.dg/tree-ssa/pr21829.c: Simplify matching since
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr38632.C b/gcc/testsuite/g++.dg/tree-ssa/pr38632.C
new file mode 100644 (file)
index 0000000..04fca22
--- /dev/null
@@ -0,0 +1,22 @@
+// { dg-do compile }
+// { dg-require-effective-target pthread } 
+// { dg-options "-O -ftree-parallelize-loops=2" }
+
+void foo();
+
+void bar(int n, char *p)
+{
+  try
+  {
+    foo();
+    ++n;
+    foo();
+    for (int i = 0; i < n-1; ++i)
+      p[i] = 0;
+  }
+  catch (...)
+  {
+    for (int i = 0; i < n; ++i)
+      p[i] = 0;
+  }
+}