Re: [Linaro-TCWG-CI] gcc-15-7765-g3866ca796d5: 8 regressions on master-thumb_m7_hard_eabi

2025-03-03 Thread Jonathan Wakely via Gcc-regression
On Mon, 3 Mar 2025 at 09:10, Christophe Lyon  wrote:
>
> Hi Jonathan,
>
> On Sun, 2 Mar 2025 at 23:28, Jonathan Wakely via Gcc-regression
>  wrote:
> >
> > On Sun, 2 Mar 2025 at 02:42,  wrote:
> > >
> > > Dear contributor,
> > >
> > > Our automatic CI has detected problems related to your patch(es). Please 
> > > find some details below.
> > >
> > > In  arm-eabi cortex-m7 hard, after:
> > >   | commit gcc-15-7765-g3866ca796d5
> > >   | Author: Jonathan Wakely 
> > >   | Date:   Thu Feb 27 13:27:17 2025 +
> > >   |
> > >   | libstdc++: Fix ranges::move and ranges::move_backward to use 
> > > iter_move [PR105609]
> > >   |
> > >   | The ranges::move and ranges::move_backward algorithms are 
> > > supposed to
> > >   | use ranges::iter_move(iter) instead of std::move(*iter), which 
> > > matters
> > >   | for an iterator type with an iter_move overload findable by ADL.
> > >   | ... 16 lines of the commit log omitted.
> > >
> > > Produces 8 regressions:
> > >   |
> > >   | regressions.sum:
> > >   | Running libstdc++:libstdc++-dg/conformance.exp ...
> > >   | FAIL: 25_algorithms/move/constrained.cc -std=gnu++20 (test for excess 
> > > errors)
> > >   | UNRESOLVED: 25_algorithms/move/constrained.cc -std=gnu++20 
> > > compilation failed to produce executable
> > >   | FAIL: 25_algorithms/move/constrained.cc -std=gnu++26 (test for excess 
> > > errors)
> > >   | UNRESOLVED: 25_algorithms/move/constrained.cc -std=gnu++26 
> > > compilation failed to produce executable
> > >   | ... and 4 more
> >
> > It looks like thumb has some unusual linking requirements that I'm not
> > familiar with, so undefined functions (which are never actually called
> > in the test) cause linker errors:
> >
> > /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/include/bits/iterator_concepts.h:155:(.text._Z6test06N8pr1056091IE+0x6):
> > undefined reference to `pr105609::iter_move(pr105609::I const&)'
> > /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi/bin/ld:
> > (_ZN8pr1056099iter_moveERKNS_1IE): Unknown destination type
> > (ARM/Thumb) in /tmp/ccqKQGzN.o
>
> This is a "recent" linker warning, which I added sometime during last
> year (so you need recent binutils if you want to try to reproduce the
> problem).
> It means that for some reason the destination symbol lacks a tag (asm
> directive) saying whether it's a thumb or an arm function. This is
> used by the linker when deciding which type of stub to insert (if
> any).
> For instance: ".type myfunc, %function"
> but normally the compiler adds this for you.
>
> But you mention "undefined functions", so that would probably be the
> reason, but how can the link succeed? Are you linking with "-z undefs"
> ?

See e.g. libstdc++-v3/testsuite/25_algorithms/move/constrained.cc
The test06 function uses undefined member functions such as
I::operator== but because test06 is never called, it shouldn't matter.

I can move test06 to a separate { dg-do compile } test, where the
linker isn't involved at all.



>
> Thanks,
>
> Christophe
>
> > /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/include/bits/iterator_concepts.h:155:(.text._Z6test06N8pr1056091IE+0x6):
> > dangerous relocation: unsupported relocation
> > /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/include/bits/ranges_algobase.h:326:(.text._Z6test06N8pr1056091IE+0xc):
> > undefined reference to `pr105609::I::operator++()'
> > /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi/bin/ld:
> > (_ZN8pr1056091IppEv): Unknown destination type (ARM/Thumb) in
> > /tmp/ccqKQGzN.o
> > /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/include/bits/ranges_algobase.h:326:(.text._Z6test06N8pr1056091IE+0xc):
> > dangerous relocation: unsupported relocation
> > /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/include/bits/ranges_algobase.h:323:(.text._Z6test06N8pr1056091IE+0x16):
> > undefined reference to `pr105609::I::operator==(pr105609::I) const'
> > /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi/bin/ld:
> > (_ZNK8pr1056091IeqES0_): Unknown destination type (ARM/Thumb) in
> > /tmp/ccqKQGzN.o
> > /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/include/bits/ranges_algobase.h:323:(.text._Z6test06N8pr1056091IE+0x16):
> > dangerous relocation: unsupported relocation
> >
> > I think I should be able to workaround this.
> >
>

Re: [Linaro-TCWG-CI] gcc-15-7765-g3866ca796d5: 8 regressions on master-thumb_m7_hard_eabi

2025-03-03 Thread Christophe Lyon via Gcc-regression
Hi Jonathan,

On Sun, 2 Mar 2025 at 23:28, Jonathan Wakely via Gcc-regression
 wrote:
>
> On Sun, 2 Mar 2025 at 02:42,  wrote:
> >
> > Dear contributor,
> >
> > Our automatic CI has detected problems related to your patch(es). Please 
> > find some details below.
> >
> > In  arm-eabi cortex-m7 hard, after:
> >   | commit gcc-15-7765-g3866ca796d5
> >   | Author: Jonathan Wakely 
> >   | Date:   Thu Feb 27 13:27:17 2025 +
> >   |
> >   | libstdc++: Fix ranges::move and ranges::move_backward to use 
> > iter_move [PR105609]
> >   |
> >   | The ranges::move and ranges::move_backward algorithms are supposed 
> > to
> >   | use ranges::iter_move(iter) instead of std::move(*iter), which 
> > matters
> >   | for an iterator type with an iter_move overload findable by ADL.
> >   | ... 16 lines of the commit log omitted.
> >
> > Produces 8 regressions:
> >   |
> >   | regressions.sum:
> >   | Running libstdc++:libstdc++-dg/conformance.exp ...
> >   | FAIL: 25_algorithms/move/constrained.cc -std=gnu++20 (test for excess 
> > errors)
> >   | UNRESOLVED: 25_algorithms/move/constrained.cc -std=gnu++20 compilation 
> > failed to produce executable
> >   | FAIL: 25_algorithms/move/constrained.cc -std=gnu++26 (test for excess 
> > errors)
> >   | UNRESOLVED: 25_algorithms/move/constrained.cc -std=gnu++26 compilation 
> > failed to produce executable
> >   | ... and 4 more
>
> It looks like thumb has some unusual linking requirements that I'm not
> familiar with, so undefined functions (which are never actually called
> in the test) cause linker errors:
>
> /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/include/bits/iterator_concepts.h:155:(.text._Z6test06N8pr1056091IE+0x6):
> undefined reference to `pr105609::iter_move(pr105609::I const&)'
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi/bin/ld:
> (_ZN8pr1056099iter_moveERKNS_1IE): Unknown destination type
> (ARM/Thumb) in /tmp/ccqKQGzN.o

This is a "recent" linker warning, which I added sometime during last
year (so you need recent binutils if you want to try to reproduce the
problem).
It means that for some reason the destination symbol lacks a tag (asm
directive) saying whether it's a thumb or an arm function. This is
used by the linker when deciding which type of stub to insert (if
any).
For instance: ".type myfunc, %function"
but normally the compiler adds this for you.

But you mention "undefined functions", so that would probably be the
reason, but how can the link succeed? Are you linking with "-z undefs"
?

Thanks,

Christophe

> /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/include/bits/iterator_concepts.h:155:(.text._Z6test06N8pr1056091IE+0x6):
> dangerous relocation: unsupported relocation
> /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/include/bits/ranges_algobase.h:326:(.text._Z6test06N8pr1056091IE+0xc):
> undefined reference to `pr105609::I::operator++()'
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi/bin/ld:
> (_ZN8pr1056091IppEv): Unknown destination type (ARM/Thumb) in
> /tmp/ccqKQGzN.o
> /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/include/bits/ranges_algobase.h:326:(.text._Z6test06N8pr1056091IE+0xc):
> dangerous relocation: unsupported relocation
> /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/include/bits/ranges_algobase.h:323:(.text._Z6test06N8pr1056091IE+0x16):
> undefined reference to `pr105609::I::operator==(pr105609::I) const'
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi/bin/ld:
> (_ZNK8pr1056091IeqES0_): Unknown destination type (ARM/Thumb) in
> /tmp/ccqKQGzN.o
> /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/include/bits/ranges_algobase.h:323:(.text._Z6test06N8pr1056091IE+0x16):
> dangerous relocation: unsupported relocation
>
> I think I should be able to workaround this.
>


Regressions on native/releases/gcc-14 at commit r14-11373 vs commit r14-11367 on Linux/x86_64

2025-03-03 Thread Haochen Jiang via Gcc-regression
Regressions on releases/gcc-14 at commit r14-11373 vs commit r14-11367 on 
Linux/x86_64
New failures:
FAIL: c-c++-common/tsan/thread_leak1.c   -O0  output pattern test
FAIL: c-c++-common/tsan/thread_leak1.c   -O0  output pattern test
FAIL: c-c++-common/tsan/thread_leak1.c   -O2  output pattern test
FAIL: c-c++-common/tsan/thread_leak1.c   -O2  output pattern test
FAIL: c-c++-common/tsan/thread_leak2.c   -O0  output pattern test
FAIL: c-c++-common/tsan/thread_leak2.c   -O0  output pattern test
FAIL: c-c++-common/tsan/thread_leak2.c   -O2  output pattern test
FAIL: c-c++-common/tsan/thread_leak.c   -O2  execution test
FAIL: c-c++-common/tsan/tiny_race.c   -O0  output pattern test
FAIL: c-c++-common/tsan/tiny_race.c   -O0  output pattern test
FAIL: c-c++-common/tsan/tiny_race.c   -O2  output pattern test
FAIL: c-c++-common/tsan/tiny_race.c   -O2  output pattern test
FAIL: c-c++-common/tsan/tls_race.c   -O2  output pattern test
FAIL: c-c++-common/tsan/volatile.c   -O0  execution test
FAIL: c-c++-common/tsan/volatile.c   -O2  execution test
FAIL: c-c++-common/tsan/write_in_reader_lock.c   -O0  output pattern test
FAIL: c-c++-common/tsan/write_in_reader_lock.c   -O2  output pattern test
FAIL: c-c++-common/tsan/write_in_reader_lock.c   -O2  output pattern test
FAIL: g++.dg/tsan/aligned_vs_unaligned_race.C   -O2  output pattern test

New passes:
FAIL: c-c++-common/tsan/atomic_stack.c   -O0  output pattern test
FAIL: c-c++-common/tsan/atomic_stack.c   -O0  output pattern test
FAIL: c-c++-common/tsan/atomic_stack.c   -O2  output pattern test
FAIL: c-c++-common/tsan/atomic_stack.c   -O2  output pattern test
FAIL: c-c++-common/tsan/bitfield_race.c   -O2  output pattern test
FAIL: c-c++-common/tsan/bitfield_race.c   -O2  output pattern test
FAIL: c-c++-common/tsan/fd_pipe_race.c   -O0  output pattern test
FAIL: c-c++-common/tsan/fd_pipe_race.c   -O2  output pattern test
FAIL: c-c++-common/tsan/fd_pipe_race.c   -O2  output pattern test
FAIL: c-c++-common/tsan/free_race.c   -O0  output pattern test
FAIL: c-c++-common/tsan/free_race.c   -O2  output pattern test
FAIL: c-c++-common/tsan/mutexset1.c   -O0  output pattern test
FAIL: c-c++-common/tsan/mutexset1.c   -O2  output pattern test
FAIL: c-c++-common/tsan/pr65400-1.c   -O2  output pattern test
FAIL: c-c++-common/tsan/pr65400-3.c   -O0  output pattern test
FAIL: c-c++-common/tsan/pr65400-3.c   -O2  output pattern test
FAIL: c-c++-common/tsan/race_on_barrier2.c   -O2  output pattern test
FAIL: c-c++-common/tsan/race_on_mutex2.c   -O0  output pattern test
FAIL: c-c++-common/tsan/race_on_mutex.c   -O0  output pattern test
FAIL: c-c++-common/tsan/simple_race.c   -O0  output pattern test
FAIL: c-c++-common/tsan/simple_stack.c   -O0  output pattern test
FAIL: c-c++-common/tsan/simple_stack.c   -O2  output pattern test
FAIL: g++.dg/tsan/pthread_cond_clockwait.C   -O2  execution test
FAIL: g++.dg/tsan/vptr_harmful_race.C   -O0  output pattern test
FAIL: g++.dg/tsan/vptr_harmful_race.C   -O2  output pattern test