OSDN Git Service

Make 's' atomic
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Jan 2010 14:28:30 +0000 (14:28 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Jan 2010 14:28:30 +0000 (14:28 +0000)
2010-01-04  H.J. Lu  <hongjiu.lu@intel.com>

PR libgomp/42602
* libgomp.fortran/recursion1.f90 (sub): Make 's' atomic.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155615 138bc75d-0d04-0410-961f-82ee72b054a4

libgomp/ChangeLog
libgomp/testsuite/libgomp.fortran/recursion1.f90

index 2dab216..2a5d3ae 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR libgomp/42602
+       * libgomp.fortran/recursion1.f90 (sub): Make 's' atomic.
+
 2010-01-03  Richard Guenther  <rguenther@suse.de>
 
        * testsuite/libgomp.fortran/recursion1.f90: New testcase.
 2010-01-03  Richard Guenther  <rguenther@suse.de>
 
        * testsuite/libgomp.fortran/recursion1.f90: New testcase.
index 0b7b271..35cb878 100644 (file)
@@ -20,6 +20,7 @@ contains
 
   subroutine sub (n)
     integer :: n
 
   subroutine sub (n)
     integer :: n
+!$omp atomic
     s = s + n
     print '(A,i3)',"loop =",n
   end subroutine
     s = s + n
     print '(A,i3)',"loop =",n
   end subroutine