This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/51591] Strange output from STOP statement in OpenMP region


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51591

Bud Davis <bdavis at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bdavis at gcc dot gnu.org

--- Comment #3 from Bud Davis <bdavis at gcc dot gnu.org> 2012-02-03 22:08:10 UTC ---
Index: gcc/libgfortran/io/unit.c
===================================================================
--- gcc/libgfortran/io/unit.c   (revision 183873)
+++ gcc/libgfortran/io/unit.c   (working copy)
@@ -637,6 +637,7 @@
   if (u->previous_nonadvancing_write)
     finish_last_advance_record (u);

+  __gthread_mutex_lock (&u->lock);
   rc = (u->s == NULL) ? 0 : sclose (u->s) == -1;

   u->closed = 1;


As theorized, the above patch does seem to correct the problem with no
regressions in the testsuite.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]