This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51591] Strange output from STOP statement in OpenMP region
- From: "bdavis at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Feb 2012 22:08:10 +0000
- Subject: [Bug fortran/51591] Strange output from STOP statement in OpenMP region
- Auto-submitted: auto-generated
- References: <bug-51591-4@http.gcc.gnu.org/bugzilla/>
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.