re PR middle-end/27310 (ICE in duplicate_eh_regions)

PR middle-end/27310
	* except.c (duplicate_eh_regions): Fix clearing of
	cfun->eh->region_array entries.

	* g++.dg/gomp/pr27310.C: New test.

From-SVN: r113453
This commit is contained in:
Jakub Jelinek 2006-05-02 12:38:12 +02:00 committed by Jakub Jelinek
parent 7d0e5ebe7b
commit d5d86fde90
4 changed files with 34 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-05-02 Jakub Jelinek <jakub@redhat.com>
PR middle-end/27310
* except.c (duplicate_eh_regions): Fix clearing of
cfun->eh->region_array entries.
2006-05-01 DJ Delorie <dj@redhat.com>
* configure.ac (gcc_cv_nm): Don't use an in-tree nm if

View File

@ -956,7 +956,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
/* Zero all entries in the range allocated. */
memset (VEC_address (eh_region, cfun->eh->region_array)
+ cfun_last_region_number + 1, 0, num_regions);
+ cfun_last_region_number + 1, 0, num_regions * sizeof (eh_region));
/* Locate the spot at which to insert the new tree. */
if (outer_region > 0)

View File

@ -1,3 +1,8 @@
2006-05-02 Jakub Jelinek <jakub@redhat.com>
PR middle-end/27310
* g++.dg/gomp/pr27310.C: New test.
2006-05-01 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/27291

View File

@ -0,0 +1,22 @@
// PR middle-end/27310
// { dg-do compile }
// { dg-options "-O2 -fopenmp" }
struct A
{
~A ();
};
struct B
{
A a, b;
};
void
foo ()
{
A c, d;
#pragma omp parallel
B e;
}