Commit 742fae05 by Jakub Jelinek Committed by Jakub Jelinek

re PR fortran/28390 (Broken !$omp parallel do lastprivate(iterationvar))

	PR fortran/28390
	* trans-openmp.c (gfc_trans_omp_do): Look for LASTPRIVATE in
	code->exp.omp_clauses rather than in the 3rd function argument.

	* testsuite/libgomp.fortran/pr28390.f: New test.

From-SVN: r115504
parent 42ccbf3d
2006-07-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/28390
* trans-openmp.c (gfc_trans_omp_do): Look for LASTPRIVATE in
code->exp.omp_clauses rather than in the 3rd function argument.
2006-07-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28384
......
......@@ -888,7 +888,7 @@ gfc_trans_omp_critical (gfc_code *code)
static tree
gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock,
gfc_omp_clauses *clauses)
gfc_omp_clauses *do_clauses)
{
gfc_se se;
tree dovar, stmt, from, to, step, type, init, cond, incr;
......@@ -897,6 +897,7 @@ gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock,
stmtblock_t body;
int simple = 0;
bool dovar_found = false;
gfc_omp_clauses *clauses = code->ext.omp_clauses;
code = code->block->next;
gcc_assert (code->op == EXEC_DO);
......@@ -907,7 +908,7 @@ gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock,
pblock = &block;
}
omp_clauses = gfc_trans_omp_clauses (pblock, clauses, code->loc);
omp_clauses = gfc_trans_omp_clauses (pblock, do_clauses, code->loc);
if (clauses)
{
gfc_namelist *n;
......
2006-07-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/28390
* testsuite/libgomp.fortran/pr28390.f: New test.
2006-07-05 Eric Christopher <echristo@apple.com>
* configure.ac: Depend addition of -pthread on host OS.
......
! PR fortran/28390
program pr28390
integer i
!$omp parallel do lastprivate(i)
do i=1,100
end do
if (i.ne.101) call abort
end
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