Go to file
Joseph Myers c29c36ad5d Add out-of-line versions of some <stdatomic.h> functions (PR c/65083).
PR c/65083 notes that some functions in <stdatomic.h> are normal
functions, not generic functions, and so need to have out-of-line
copies that can be called when macro expansion is suppressed (unlike
the generic functions where DR#419 makes it undefined if you suppress
a macro expansion).

This patch adds such out-of-line definitions in libatomic for those
six functions, at a new LIBATOMIC_1.2 symbol version, as trivial
wrappers to the <stdatomic.h> macros, along with declarations of those
functions in <stdatomic.h>.  Tests are added that are based on the
corresponding tests for the macros, but with parentheses around the
function names to force the out-of-line functions to be used.

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

gcc:
	* ginclude/stdatomic.h (atomic_thread_fence, atomic_signal_fence)
	(atomic_flag_test_and_set, atomic_flag_test_and_set_explicit)
	(atomic_flag_clear, atomic_flag_clear_explicit): Declare as
	functions before defining as macros.

gcc/testsuite:
	* gcc.dg/atomic/stdatomic-fence-2.c,
	gcc.dg/atomic/stdatomic-flag-2.c: New tests.

libatomic:
	* fence.c, flag.c: New files.
	* Makefile.am (libatomic_la_SOURCES): Add fence.c and flag.c.
	* Makefile.in: Regenerate.
	* configure.ac (libtool_VERSION): Change to 3:0:2.
	* configure: Regenerate.
	* libatomic.map (LIBATOMIC_1.2): New symbol version.

From-SVN: r230578
2015-11-18 22:13:44 +00:00
boehm-gc
config
contrib count-headers: Initial file. 2015-11-11 14:28:46 +00:00
fixincludes
gcc Add out-of-line versions of some <stdatomic.h> functions (PR c/65083). 2015-11-18 22:13:44 +00:00
gnattools
gotools Makefile.am (go_cmd_go_files): Update to Go 1.5.1 library by adding alldocs.go, doc.go, note.go. 2015-10-31 21:29:38 +00:00
include c-pragma.c (oacc_pragmas): Add entry for declare directive. 2015-11-12 22:20:41 +00:00
INSTALL
intl
libada
libatomic Add out-of-line versions of some <stdatomic.h> functions (PR c/65083). 2015-11-18 22:13:44 +00:00
libbacktrace
libcc1
libcilkrts re PR target/66326 (Floating point exception with -mfpmath=387 and -fcilkplus.) 2015-11-09 10:12:34 +00:00
libcpp Source range tracking in libcpp and C FE, with bit-packing optimization 2015-11-13 16:29:59 +00:00
libdecnumber
libffi re PR libffi/65441 (FAIL: libffi.call/float2.c -W -Wall -Wno-psabi (test for excess errors)) 2015-10-27 00:39:32 +00:00
libgcc nvptx.c (global_lock_var): New. 2015-11-18 13:49:17 +00:00
libgfortran
libgo libgo: use Solaris sendfile lib, fix Solaris _in6_addr_t fields 2015-11-10 21:38:30 +00:00
libgomp nvptx.c (global_lock_var): New. 2015-11-18 13:49:17 +00:00
libiberty * Makefile.in (etags tags TAGS): Use && instead of ;. 2015-11-12 19:18:54 +00:00
libitm Support sized delete. 2015-11-09 17:30:24 +00:00
libjava libjava: fix locale handling when sorting JNI methods 2015-10-26 18:32:41 +00:00
libmpx
libobjc replace BITS_PER_UNIT with __CHAR_BIT__ in target libs 2015-11-07 19:36:26 +00:00
liboffloadmic omp-low.c (lower_omp_ordered): Add argument to GOMP_SMD_ORDERED_* internal calls - 0 if... 2015-11-14 19:42:13 +01:00
libquadmath
libsanitizer Update libsanitizer obstack interceptors 2015-11-09 14:53:25 +10:30
libssp
libstdc++-v3 PR libstdc++/66059 optimise _Build_index_tuple 2015-11-17 19:54:33 +00:00
libvtv Correct libvtv obstack use 2015-11-09 14:49:43 +10:30
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitignore
ABOUT-NLS
ChangeLog configure.ac: Enable libmpx by default. 2015-11-13 06:48:20 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure configure.ac: Enable libmpx by default. 2015-11-13 06:48:20 +00:00
configure.ac configure.ac: Enable libmpx by default. 2015-11-13 06:48:20 +00:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Update email address. 2015-10-23 17:06:07 +00:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.