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 PR 84519 Handle optional QUIET specifier for STOP and ERROR STOP 2018-02-23 11:07:24 +02:00
config Update copyright years. 2018-01-03 11:03:58 +01:00
generated re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
ieee Update copyright years. 2018-01-03 11:03:58 +01:00
intrinsics Include <sys/random.h> for getentropy on Solaris 2018-08-14 22:51:36 +00:00
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 Update copyright years. 2018-01-03 11:03:58 +01:00
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 Rotate ChangeLog for 2013. 2014-06-17 06:55:59 +03:00
ChangeLog-2014 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2015 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2016 Update copyright years. 2017-01-01 13:07:43 +01:00
ChangeLog-2017 Update copyright years. 2018-01-03 11:03:58 +01:00
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 re PR target/78478 (Compile Error for i386-rtems) 2017-01-19 22:00:53 +01:00
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 Update copyright years. 2018-01-03 11:03:58 +01:00
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 re PR fortran/34640 (ICE when assigning item of a derived-component to a pointer) 2017-09-10 17:02:53 +00:00
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