2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-13 10:50:49 +08:00

re PR target/37436 (arm-cross-g++. internal compiler error: in extract_insn, at recog.c:1990)

PR c++/37436
	* gimple.h (gimple_has_substatements): GIMPLE_OMP_CRITICAL has
	substatements.
	* tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_CRITICAL.

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

From-SVN: r139937
This commit is contained in:
Jakub Jelinek 2008-09-03 15:03:56 +02:00 committed by Jakub Jelinek
parent a6340be144
commit 05a26161b4
5 changed files with 34 additions and 0 deletions

@ -1,3 +1,10 @@
2008-09-03 Jakub Jelinek <jakub@redhat.com>
PR c++/37436
* gimple.h (gimple_has_substatements): GIMPLE_OMP_CRITICAL has
substatements.
* tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_CRITICAL.
2008-09-03 Bernd Schmidt <bernd.schmidt@analog.com>
From Michael Frysinger <michael.frysinger@analog.com>

@ -1052,6 +1052,7 @@ gimple_has_substatements (gimple g)
case GIMPLE_OMP_TASK:
case GIMPLE_OMP_SECTIONS:
case GIMPLE_OMP_SINGLE:
case GIMPLE_OMP_CRITICAL:
case GIMPLE_WITH_CLEANUP_EXPR:
return true;

@ -1,3 +1,8 @@
2008-09-03 Jakub Jelinek <jakub@redhat.com>
PR c++/37436
* g++.dg/gomp/pr37436.C: New test.
2008-09-03 Bernd Schmidt <bernd.schmidt@analog.com>
From Mike Frysinger <michael.frysinger@analog.com>

@ -0,0 +1,15 @@
// PR c++/37436
// { dg-do compile }
// { dg-options "-fopenmp" }
struct A
{
A ();
int i;
};
A::A ()
{
#pragma omp critical
i++;
}

@ -1156,6 +1156,12 @@ remap_gimple_stmt (gimple stmt, copy_body_data *id)
(s1, gimple_omp_single_clauses (stmt));
break;
case GIMPLE_OMP_CRITICAL:
s1 = remap_gimple_seq (gimple_omp_body (stmt), id);
copy
= gimple_build_omp_critical (s1, gimple_omp_critical_name (stmt));
break;
default:
gcc_unreachable ();
}