On Mon, Aug 03, 2026 at 01:56:35PM +0200, Torbjorn SVENSSON wrote:
> On 2026-08-03 13:54, Jakub Jelinek wrote:
> > On Mon, Aug 03, 2026 at 01:50:18PM +0200, Torbjorn SVENSSON wrote:
> > > This change introduces new failures for arm-none-eabi using thumb/arch=armv6s-m/cpu=cortex-m0/float-abi=soft/fpu=auto.
> > >
> > > bitint-100.c:(.text+0x5a): undefined reference to `__atomic_compare_exchange_4'
> > > /build/install-native/arm-none-eabi/bin/ld: (__atomic_compare_exchange_4): Unknown destination type (ARM/Thumb) in /tmp/ccgSaSgH.o
> > > FAIL: gcc.dg/torture/bitint-100.c -O0 (test for excess errors)
> > >
> > > Same failure exist on both trunk and releases/gcc-16.
> >
> > I thought gcc has been changed to add -latomic_asneeded by default.
> > Or is this because the linker doesn't support it in this configuration?
> To my knowledge, there is no atomic support for armv6s-m, but I can be wrong.
Most of the tests that are dg-do run and use atomics on int/long use
sync_int_long effective target. Atomics on _BitInt(17), i.e. something
on all currently supported targets larger than short, probably need to be
treated the same.
2026-08-04 Jakub Jelinek <jakub@redhat.com>
PR target/124948
* gcc.dg/torture/bitint-100.c: Require also sync_int_long effective
target.
Reviewed-by: Andrea Pinski <andrew.pinski@oss.qualcomm.com>
/* PR target/124948 */
-/* { dg-do run { target bitint } } */
+/* { dg-do run { target { bitint && sync_int_long } } } */
/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */