[Bug c/54266] New: atomic / sync preprocessor macros inconsistent with (does not reflect) functionality of atomic / sync support.
hp at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 14 23:06:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54266
Bug #: 54266
Summary: atomic / sync preprocessor macros inconsistent with
(does not reflect) functionality of atomic / sync
support.
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hp@gcc.gnu.org
CC: amacleod@redhat.com
The preprocessor macros defined in c-family/c-cppbuiltin.c:cpp_atomic_builtins
don't correctly reflect whether atomic builtins work (can be linked and
executed). They just check for presence of certain MD patterns, while library
calls are just as valid.
This PR is similar to PR54006, but just intended to track the issue of
usability of the preprocessor macros. For example, the cas_int target; the
check_effective_target_cas_int function doesn't catch targets implementing
atomics by calling library functions because __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2
and __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 are unusable for this purpose. See also
the test-case in PR54261.
More information about the Gcc-bugs
mailing list