https://gcc.gnu.org/g:53f44e2c5fccf31bd0b4e356d5f09a0e0919579d

commit r16-9505-g53f44e2c5fccf31bd0b4e356d5f09a0e0919579d
Author: Jakub Jelinek <[email protected]>
Date:   Tue Aug 4 21:41:16 2026 +0200

    testsuite: Fix up gcc.dg/torture/bitint-100.c test [PR124948]
    
    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  <[email protected]>
    
            PR target/124948
            * gcc.dg/torture/bitint-100.c: Require also sync_int_long effective
            target.
    
    Reviewed-by: Andrea Pinski <[email protected]>
    (cherry picked from commit 17d0df5cdb1b2983481612e4e454f659bc5ff738)

Diff:
---
 gcc/testsuite/gcc.dg/torture/bitint-100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/torture/bitint-100.c 
b/gcc/testsuite/gcc.dg/torture/bitint-100.c
index 4c6e781777c7..b9a75db67aaf 100644
--- a/gcc/testsuite/gcc.dg/torture/bitint-100.c
+++ b/gcc/testsuite/gcc.dg/torture/bitint-100.c
@@ -1,5 +1,5 @@
 /* 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" } { "" } } */

Reply via email to