gcc/libgfortran
Janne Blomqvist f4c0f88881 Make recursion_check work for multiple threads
With multiple threads, using an unprotected static variable to check
whether recursion has occured isn't valid, as one thread might have
modified the variable, thus causing another thread to incorrectly
conclude that recursion has occured.  This patch avoids this problem
by using a thread-specific variable for the recursion check.

Regtested on x86_64-pc-linux-gnu.

libgfortran/ChangeLog:

2018-11-23  Janne Blomqvist  <jb@gcc.gnu.org>

	* runtime/error.c (MAGIC): Remove.
	(recursion_key): New variable.
	(recursion_check): Use thread-specific variable for recursion
	check if threads are active.
	(constructor_recursion_check): New function.
	(destructor_recursion_check): New funcion.

From-SVN: r266419
2018-11-23 22:42:03 +02:00
..
caf
config
generated re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
ieee
intrinsics
io Replace sync builtins with atomic builtins 2018-11-22 09:58:29 +02:00
m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
runtime Make recursion_check work for multiple threads 2018-11-23 22:42:03 +02:00
acinclude.m4 Replace sync builtins with atomic builtins 2018-11-22 09:58:29 +02:00
aclocal.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
c99_protos.h
ChangeLog Make recursion_check work for multiple threads 2018-11-23 22:42:03 +02:00
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
config.h.in Replace sync builtins with atomic builtins 2018-11-22 09:58:29 +02:00
configure Replace sync builtins with atomic builtins 2018-11-22 09:58:29 +02:00
configure.ac Replace sync builtins with atomic builtins 2018-11-22 09:58:29 +02:00
configure.host
gfortran.map re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
kinds-override.h
libgfortran.h re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
libgfortran.spec.in
libtool-version
Makefile.am Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
Makefile.in Replace sync builtins with atomic builtins 2018-11-22 09:58:29 +02:00
mk-kinds-h.sh
mk-sik-inc.sh
mk-srk-inc.sh