Commit 8b46837c by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/35099 (ICE in remove_unreachable_regions with -O -fopenmp)

	PR middle-end/35099
	* tree-cfg.c (new_label_mapper): Update cfun->last_label_uid.

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

From-SVN: r133084
parent e1e7141c
2008-03-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35099
* tree-cfg.c (new_label_mapper): Update cfun->last_label_uid.
2008-03-10 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/35494
......
2008-03-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35099
* g++.dg/gomp/pr35099.C: New test.
2008-03-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/range_check2.adb: New test.
// PR middle-end/35099
// { dg-do compile }
// { dg-options "-O2 -fopenmp" }
struct A
{
~A () throw ();
void foo ();
};
struct B
{
B () { A ().foo (); }
};
void
bar ()
{
#pragma omp parallel
{
#pragma omp single
B ();
#pragma omp for
for (int i = 0; i < 2; ++i)
B ();
}
}
void
baz ()
{
#pragma omp parallel
{
#pragma omp single
B ();
#pragma omp single
B ();
}
}
......@@ -5895,6 +5895,8 @@ new_label_mapper (tree decl, void *data)
m->base.from = decl;
m->to = create_artificial_label ();
LABEL_DECL_UID (m->to) = LABEL_DECL_UID (decl);
if (LABEL_DECL_UID (m->to) >= cfun->last_label_uid)
cfun->last_label_uid = LABEL_DECL_UID (m->to) + 1;
slot = htab_find_slot_with_hash (hash, m, m->hash, INSERT);
gcc_assert (*slot == NULL);
......
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