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
This commit is contained in:
parent
9cc1244e76
commit
722ba5eeac
@ -1,3 +1,9 @@
|
||||
2007-05-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/31769
|
||||
* except.c (duplicate_eh_regions): Clear prev_try if
|
||||
ERT_MUST_NOT_THROW region is inside of ERT_TRY region.
|
||||
|
||||
2007-05-30 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
* tree-scalar-evolution.c (scev_const_prop): Do not create labels.
|
||||
|
@ -1005,7 +1005,11 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
|
||||
for (prev_try = VEC_index (eh_region, cfun->eh->region_array, outer_region);
|
||||
prev_try && prev_try->type != ERT_TRY;
|
||||
prev_try = prev_try->outer)
|
||||
;
|
||||
if (prev_try->type == ERT_MUST_NOT_THROW)
|
||||
{
|
||||
prev_try = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Remap all of the internal catch and cleanup linkages. Since we
|
||||
duplicate entire subtrees, all of the referenced regions will have
|
||||
|
@ -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.
|
||||
|
61
gcc/testsuite/g++.dg/gomp/pr31769.C
Normal file
61
gcc/testsuite/g++.dg/gomp/pr31769.C
Normal file
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user