Bug 56964 - ICE with -fno-sync-libcalls when target lacks atomic operations
ICE with -fno-sync-libcalls when target lacks atomic operations
Status: UNCONFIRMED
Product: gcc
Classification: Unclassified
Component: middle-end
4.8.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-15 10:44 UTC by Mans Rullgard
Modified: 2013-04-15 10:44 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mans Rullgard 2013-04-15 10:44:56 UTC
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.