[Patch, Fortran] Fix CRITICAL handling with -fcoarray=lib
Tobias Burnus
burnus@net-b.de
Fri Aug 15 16:33:00 GMT 2014
It turned out that the CRITICAL patch had two issues:
a) The lock variable was named "__lock_var@0". That's unambiguous but
the linker didn't like the file name. As the variable is unused (only
the associated token gets used), the assembler error only occurred with
-O0 and hence not in the test suite. That's now fixed by using valid
mangled name; I did the same for the type, which shouldn't show up in
the assembly except for the DWARF type output. But for completeness, I
have also mangled it properly.
b) I somehow mixed up the arguments of LOCK; the lock_acquired argument
is a pointer to a Boolean variable, telling whether the lock could be
obtained. For CRITICAL, we want to pass NULL, which means that LOCK
waits until the lock can be obtained. That issue was caught by
coarray/sync_{1,3}.f90, but somehow, I had missed it.
Committed as obvious in Rev. 214029.
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: committed.diff
Type: text/x-patch
Size: 2095 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140815/806e6136/attachment.bin>
More information about the Fortran
mailing list