Go to file
Uros Bizjak 23462d4d8f re PR middle-end/37908 (atomic NAND op generate wrong code; __sync_nand_and_fetch, __sync_fetch_and_nand)
PR middle-end/37908
	* optabs.c (expand_sync_operation): Properly handle NAND case
	by calculating ~(t1 & val) instead of (~t1 & val).
	* builtins.c (expand_builtin_sync_operation): Warn for changed
	semantics in NAND builtins.
	* c.opt (Wsync-nand): New warning option.  Describe -Wsync-nand.
	
	* doc/invoke.texi (Warning options): Add Wsync-nand.
	* doc/extend.texi (Atomic Builtins) [__sync_fetch_and_nand]: Correct
	__sync_fetch_and_nand builtin operation in the example.  Add a note
	about changed semantics in GCC 4.4.
	[__sync_nand_and_fetch]: Correct __sync_nand_and_fetch builtin
	operation in the example.  Add a note about changed semantics in
	GCC 4.4.

testsuite/ChangeLog:

	PR middle-end/37908
	* gcc.dg/pr37908.c: New test.
	* gcc.dg/ia64-sync-1.c: Correct __sync_fetch_and_nand and
	__sync_nand_and_fetch results.  Add dg-message to look for the warning
	about changed semantics of NAND builtin.
	(init_si, init_di): Change init value for __sync_fetch_and_nand to -1.
	(test_si, test_di): Change expected result of
	__sync_nand_and_fetch to ~7.
	* gcc.dg/ia64-sync-2.c: Correct __sync_fetch_and_nand and
	__sync_nand_and_fetch results.  Add dg-message to look for the warning
	about changed semantics of NAND builtin.
	(init_noret_si, init_noret_di): Change init value for
	__sync_fetch_and_nand to -1.
	(init_noret_si, init_noret_di): Change expected result of
	__sync_nand_and_fetch to ~7.
	* gcc.dg/sync-2.c: Correct __sync_fetch_and_nand and
	__sync_nand_and_fetch results.  Add dg-message to look for the warning
	about changed semantics of NAND builtin.
	(init_qi, init_qi): Change init value for __sync_fetch_and_nand to -1.
	(init_hi, init_hi): Change expected result of
	__sync_nand_and_fetch to ~7.
	* gcc.dg/sync-3.c: Copy from sync-2.c instead of including
	the c source file.
	* gcc.c-torture/compile/sync-1.c: Add dg-message to look for the
	warning about changed semantics of NAND builtin.
	* gcc.c-torture/compile/sync-2.c: Ditto.
	* gcc.c-torture/compile/sync-3.c: Ditto.

From-SVN: r141942
2008-11-17 12:19:06 +01:00
boehm-gc
config
contrib
fixincludes
gcc re PR middle-end/37908 (atomic NAND op generate wrong code; __sync_nand_and_fetch, __sync_fetch_and_nand) 2008-11-17 12:19:06 +01:00
gnattools
include
INSTALL
intl
libada
libcpp
libdecnumber
libffi
libgcc
libgfortran re PR libfortran/38097 (I/O with blanks in exponent fails; blank="NULL", BN edit descriptor) 2008-11-16 16:12:16 +00:00
libgomp
libiberty
libjava
libmudflap
libobjc
libssp
libstdc++-v3
maintainer-scripts
zlib
ABOUT-NLS
ChangeLog
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
README.SCO
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the file 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.html for how to report bugs usefully.