Commit 722ba5ee by Jakub Jelinek Committed by Jakub Jelinek

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
parent 9cc1244e
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> 2007-05-30 Zdenek Dvorak <dvorakz@suse.cz>
* tree-scalar-evolution.c (scev_const_prop): Do not create labels. * 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, ...@@ -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); for (prev_try = VEC_index (eh_region, cfun->eh->region_array, outer_region);
prev_try && prev_try->type != ERT_TRY; prev_try && prev_try->type != ERT_TRY;
prev_try = prev_try->outer) 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 /* Remap all of the internal catch and cleanup linkages. Since we
duplicate entire subtrees, all of the referenced regions will have duplicate entire subtrees, all of the referenced regions will have
......
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> 2007-05-29 Hui-May Chang <hm.chang@apple.com>
* gcc.target/i386/stack-realign.c: New. * gcc.target/i386/stack-realign.c: New.
// 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)
{
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment