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



             Bug #: 56964

           Summary: ICE with -fno-sync-libcalls when target lacks atomic

                    operations

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: middle-end

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: m...@mansr.com





Use of __atomic_* functions when compiling for a target without atomic

operations (e.g. ARMv6) while specifying -fno-sync-libcalls gives an ICE

instead of a proper error message.



$ cat foo.c

int *x;

void foo(void)

{

    __atomic_test_and_set(x, 0);

}



$ arm-unknown-linux-gnueabi-gcc-4.8.0 -c foo.c -march=armv6 -fno-sync-libcalls

foo.c: In function 'foo':

foo.c:4:26: internal compiler error: in emit_move_insn, at expr.c:3486

     __atomic_test_and_set(x, 0);

                          ^

Please submit a full bug report,

with preprocessed source if appropriate.



This happens for any target without atomic operations in hardware.

Reply via email to