diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-05-30 15:46:25 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-05-30 15:46:25 +0200 |
commit | 722ba5eeacaeaf2c913d74f5d17b5e8ab9f04d37 (patch) | |
tree | bdd58629392eea9ed231c4409541624029fefcce /gcc/testsuite | |
parent | 9cc1244e762b1cab9245e54a3061e12950c3b8f1 (diff) | |
download | gcc-722ba5eeacaeaf2c913d74f5d17b5e8ab9f04d37.zip gcc-722ba5eeacaeaf2c913d74f5d17b5e8ab9f04d37.tar.gz gcc-722ba5eeacaeaf2c913d74f5d17b5e8ab9f04d37.tar.bz2 |
re PR tree-optimization/31769 (ICE with OpenMP and exceptions)
PR tree-optimization/31769
* except.c (duplicate_eh_regions): Clear prev_try if
ERT_MUST_NOT_THROW region is inside of ERT_TRY region.
* g++.dg/gomp/pr31769.C: New test.
From-SVN: r125183
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/gomp/pr31769.C | 61 |
2 files changed, 66 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d69c0d7..84d379a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-05-30 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/31769 + * g++.dg/gomp/pr31769.C: New test. + 2007-05-29 Hui-May Chang <hm.chang@apple.com> * gcc.target/i386/stack-realign.c: New. diff --git a/gcc/testsuite/g++.dg/gomp/pr31769.C b/gcc/testsuite/g++.dg/gomp/pr31769.C new file mode 100644 index 0000000..54945f9 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr31769.C @@ -0,0 +1,61 @@ +// PR tree-optimization/31769 +// { dg-options "-O2 -fopenmp" } +// { dg-do compile } + +struct B +{ + B () {} + virtual ~B () {} +}; +struct C +{ + C (int x, int y) {} +}; +template<typename T, int U> +struct D +{ + D () {} + ~D () {} +}; +struct E +{ + E () {} + ~E () {} + D<int, 1> e; +}; +struct A +{ + B *b; + A () { b = __null; } + ~A () { if (b != __null) delete b; } +}; +struct F : public A +{ + explicit F (int x) { foo (0); } + F (const F &x) {} + F (F &x, C y) {} + F operator () (C x) const + { + return F (const_cast<F &>(*this), x); + } + template <typename U> F & operator+= (const U &); + void foo (int); + E f; +}; + +int +main () +{ + try + { + F f (10); + F g (10); + C h (0, 9); +#pragma omp parallel for + for (int i = 0; i < 2; ++i) + g += f (h); + } + catch (int &e) + { + } +} |