Commit e8789588 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/38676 (ICE during regimplification of GIMPLE_SWITCH)

	PR middle-end/38676
	* gimplify.c (gimple_regimplify_operands): For GIMPLE_SWITCH
	only regimplify switch index.

	* gcc.dg/gomp/pr38676.c: New test.

From-SVN: r142970
parent 66e8b99c
2008-12-31 Jakub Jelinek <jakub@redhat.com>
PR middle-end/38676
* gimplify.c (gimple_regimplify_operands): For GIMPLE_SWITCH
only regimplify switch index.
2008-12-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38645
......@@ -7380,6 +7380,10 @@ gimple_regimplify_operands (gimple stmt, gimple_stmt_iterator *gsi_p)
gimplify_expr (gimple_cond_rhs_ptr (stmt), &pre, NULL,
is_gimple_val, fb_rvalue);
break;
case GIMPLE_SWITCH:
gimplify_expr (gimple_switch_index_ptr (stmt), &pre, NULL,
is_gimple_val, fb_rvalue);
break;
case GIMPLE_OMP_ATOMIC_LOAD:
gimplify_expr (gimple_omp_atomic_load_rhs_ptr (stmt), &pre, NULL,
is_gimple_val, fb_rvalue);
......
2008-12-31 Jakub Jelinek <jakub@redhat.com>
PR middle-end/38676
* gcc.dg/gomp/pr38676.c: New test.
2008-12-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38645
......
/* PR middle-end/38676 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
int
main ()
{
int bar, foo = 1;
#pragma omp parallel for shared(foo)
for (bar = 0; bar < 3; bar++)
{
switch (foo)
{
case 1:
break;
}
}
return 0;
}
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