[Patch, libfortran] Multi-threaded random_number
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Thu Aug 11 14:55:00 GMT 2016
Hi Janne,
> committed a slightly modified patch as r239356. Changes from the
> submitted patch attached. To my surprise, it turned out that my
> fallback code using __gthread_key_{create,delete} and
> __ghtread_{get,set}_specific was faster than my TLS code, so I removed
> the TLS configure magic and the TLS code and just left the __gthread
> stuff in.
this patch broke Solaris bootstrap:
/vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/random.c: In function 'constructor_random':
/vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/
random.c:915:45: error: 'free' undeclared (first use in this function); did you mean 'frexp'?
__gthread_key_create (&rand_state_key, &free);
^~~~
frexp
/vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/random.c:915:45: note: each undeclared identifier is reported only once for each function it appears in
You need to include <stdlib.h> for the free declaration, as this patch
does. Allowed i386-pc-solaris2.12 and sparc-sun-solaris2.12 to
continue. I'm going to install this as obvious.
Rainer
2016-08-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libgfortran:
* intrinsics/random.c: Include <stdlib.h>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgfortran-free.patch
Type: text/x-patch
Size: 353 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160811/0518b10c/attachment.bin>
-------------- next part --------------
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Fortran
mailing list