summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-16 20:19:27 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-16 20:19:27 +0000
commitfadc302ea95e7473f6eacf8eb355ec42bab8abda (patch)
tree6ee884f0b083b665ed63861a34cbb674ebe062cc
parentf6771537a9c40c08809609eb3ef93d953133dee5 (diff)
downloadgcc-fadc302ea95e7473f6eacf8eb355ec42bab8abda.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115504 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-openmp.c5
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.fortran/pr28390.f8
4 files changed, 22 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 96fbeab5ff5..3f9f928d852 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 76124acfc30..e817196abb7 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -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;
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index bd63f3db772..7824dd43971 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+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.
diff --git a/libgomp/testsuite/libgomp.fortran/pr28390.f b/libgomp/testsuite/libgomp.fortran/pr28390.f
new file mode 100644
index 00000000000..68fc32b6f50
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/pr28390.f
@@ -0,0 +1,8 @@
+! 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