[Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented

hp at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 14 18:51:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54261

             Bug #: 54261
           Summary: reverse sync/atomic operators when only
                    sync_compare_and_swap_optab libfuncs implemented
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hp@gcc.gnu.org
            Target: cris*-*-linux-gnu


If a target implements atomics by only setting sync_compare_and_swap_optab
libfuncs (see cris.c:cris_init_libfuncs), a path less travelled is used, on
which a bug lies, causing sync/atomic operators to be implemented with the
reverse operator, e.g. minus instead of plus.  See test-case to be added and
patch to be posted and referenced.



More information about the Gcc-bugs mailing list