Commit 3088d404 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/35364 (ICE on ia64 with vector declaration inside #pragma omp parallel)

	PR target/35364
	* tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers.

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

From-SVN: r133905
parent c9a22ea1
2008-04-04 Jakub Jelinek <jakub@redhat.com>
PR target/35364
* tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers.
2008-04-04 H.J. Lu <hongjiu.lu@intel.com>
* config.gcc (extra_headers): Add wmmintrin.h for x86 and x86-64.
......
2008-04-04 Jakub Jelinek <jakub@redhat.com>
PR target/35364
* g++.dg/gomp/pr35364.C: New test.
2008-04-04 H.J. Lu <hongjiu.lu@intel.com>
* g++.dg/other/i386-2.C: Include <wmmintrin.h>.
// PR target/35364
// { dg-do compile }
// { dg-options "-O2 -fopenmp" }
template <typename T>
struct E
{
E ();
~E ();
};
template <typename T, typename U>
struct C
{
C (const U &y) : u (y) {}
~C () {}
const U &u;
};
template <typename T, typename U = E<T> >
struct B : public C<T, U>
{
B (int x, const T &z = T (), const U &y = U ()) : C<T, U> (y) {}
~B () {}
};
void
foo ()
{
#pragma omp parallel
{
B<double> x (1);
}
#pragma omp for
for (int i = 0; i < 10; i++)
{
B<int> x (i);
}
#pragma omp sections
{
#pragma omp section
{
B<int> x (6);
}
}
#pragma omp single
{
B<int> x (16);
}
}
......@@ -1917,6 +1917,33 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data)
data->last_goto = NULL;
break;
case OMP_PARALLEL:
/* Make sure the outermost BIND_EXPR in OMP_BODY isn't removed
as useless. */
remove_useless_stmts_1 (&BIND_EXPR_BODY (OMP_BODY (*tp)), data);
data->last_goto = NULL;
break;
case OMP_SECTIONS:
case OMP_SINGLE:
case OMP_SECTION:
case OMP_MASTER :
case OMP_ORDERED:
case OMP_CRITICAL:
remove_useless_stmts_1 (&OMP_BODY (*tp), data);
data->last_goto = NULL;
break;
case OMP_FOR:
remove_useless_stmts_1 (&OMP_FOR_BODY (*tp), data);
data->last_goto = NULL;
if (OMP_FOR_PRE_BODY (*tp))
{
remove_useless_stmts_1 (&OMP_FOR_PRE_BODY (*tp), data);
data->last_goto = NULL;
}
break;
default:
data->last_goto = NULL;
break;
......
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