diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-10 07:51:55 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-10 07:51:55 +0000 |
commit | dcaa067ea507d61dbd6ce3f4dc1b7c05beb68781 (patch) | |
tree | 9d3f2ce4c54127ae9b5aa594d54bd9031add67ce /libgomp | |
parent | 3d053ea5c19cfe989d10c3d847d0bbe1c73a7386 (diff) | |
download | gcc-dcaa067ea507d61dbd6ce3f4dc1b7c05beb68781.tar.gz |
PR fortran/34020
* gimplify.c (goa_lhs_expr_p): Inside INDIRECT_REF handle unshared
nops.
* testsuite/libgomp.fortran/pr34020.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130069 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/pr34020.f90 | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 3a7d2f5d53e..08b417b9a54 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2007-11-10 Jakub Jelinek <jakub@redhat.com> + + PR fortran/34020 + * testsuite/libgomp.fortran/pr34020.f90: New test. + 2007-11-06 Jakub Jelinek <jakub@redhat.com> PR c++/33894 diff --git a/libgomp/testsuite/libgomp.fortran/pr34020.f90 b/libgomp/testsuite/libgomp.fortran/pr34020.f90 new file mode 100644 index 00000000000..3bb14f5fe3d --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/pr34020.f90 @@ -0,0 +1,19 @@ +! PR fortran/34020 +! { dg-do run } + + subroutine atomic_add(lhs, rhs) + real lhs, rhs +!$omp atomic + lhs = rhs + lhs + end + + real lhs, rhs + integer i + lhs = 0 + rhs = 1 +!$omp parallel do num_threads(8) shared(lhs, rhs) + do i = 1, 300000 + call atomic_add(lhs, rhs) + enddo + if (lhs .ne. 300000) call abort + end |