https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120567
Bug ID: 120567
Summary: [16 Regression] std::stacktrace tests now fail on
arm-eabi
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: testsuite-fail
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
Target: arm-eabi
My changes for Bug 119667 cause test failures on arm-eabi:
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi/bin/ld:
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/libstdc++-v3/src/experimental/.libs/libstdc++exp.a(std_stacktrace-fileline.o):
in function `fileline_initialize':
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/libstdc++-v3/src/libbacktrace/fileline.c:260:(.text+0x74):
warning: This implementation of __sync_synchronize is a stub with no effect.
Relink with
-specs=sync-{none,dmb,cp15dmb}.specs
to specify exactly which barrier format to use and avoid this warning
The problem is that the new configure tests for atomics needed by libbacktrace
do this:
int i = 0;
int* p = &i;
__SIZE_TYPE__ s = 0;
// backtrace_atomic_load_pointer
void* vp = __atomic_load_n(&p, __ATOMIC_ACQUIRE);
// backtrace_atomic_load_int
int i2 = __atomic_load_n(&i, __ATOMIC_ACQUIRE);
// backtrace_atomic_store_pointer
__atomic_store_n(&p, &i, __ATOMIC_RELEASE);
// backtrace_atomic_store_size_t
__atomic_store_n(&s, s, __ATOMIC_RELEASE);
// backtrace_atomic_store_int
__atomic_store_n(&i, i, __ATOMIC_RELEASE);
and this does compile, and doesn't emit any references to __atomic_load_n or
__atomic_store_n, but it does emit references to __sync_synchronize:
mov r3, #0
str r3, [fp, #-24]
sub r3, fp, #24
str r3, [fp, #-28]
mov r3, #0
str r3, [fp, #-32]
sub r3, fp, #28
ldr r4, [r3]
bl __sync_synchronize
str r4, [fp, #-16]
sub r3, fp, #24
ldr r4, [r3]
bl __sync_synchronize
str r4, [fp, #-20]
sub r5, fp, #24
sub r4, fp, #28
bl __sync_synchronize
str r5, [r4]
ldr r5, [fp, #-32]
sub r4, fp, #32
bl __sync_synchronize
str r5, [r4]
ldr r3, [fp, #-24]
mov r5, r3
sub r4, fp, #24
bl __sync_synchronize
str r5, [r4]
I'm not sure whether we want to avoid using atomics for stacktraces on
arm-eabi, or require one of those specs options for the testsuite.