summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-12 00:09:17 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-12 00:09:17 +0000
commite41cb1f2fd5cb14cedce1c6b374a683d76ca0e18 (patch)
treef7bb2eab14e5375cb9c2f725224a62b46d0941ca /gcc/testsuite/g++.dg
parenta111083a0c09b453abdcb039e8178358c5be3d6d (diff)
downloadgcc-e41cb1f2fd5cb14cedce1c6b374a683d76ca0e18.tar.gz
2009-05-11 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/38632 * g++.dg/tree-ssa/pr38632.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr38632.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr38632.C b/gcc/testsuite/g++.dg/tree-ssa/pr38632.C
new file mode 100644
index 00000000000..04fca228021
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr38632.C
@@ -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;
+ }
+}