Two ARM fixes for long-open Bugzilla reports; both crash trunk today.
Without patch 1, compiling its testcase segfaults the compiler (PR126164,
a null libfunc rtx reaching emit_library_call under -mabi=atpcs or
-mabi=apcs-gnu). Without patch 2, two of the four doubleword
auto-increment forms assert in output_move_double where ldrd cannot
express them (PR97807); with checking disabled the assert is
__builtin_unreachable, so a release compiler falls through to an
odd-register ldrd that the assembler rejects.
Testing. gcc.target/arm/arm.exp on an arm-none-eabi cross at trunk
9a135e85c2e (armv7-a, compile-only, so its link tests fail identically in
both arms): 3034 -> 3044 expected passes, 61 -> 55 unexpected failures and
58 -> 51 unresolved, with no pre-existing test changing status. Without the
patches pr126164.c segfaults the compiler, and pr97807.c and pr97807-2.c ICE
in output_move_double at the two asserts they replace.
Four patches from an earlier series (2026-08-02) are still outstanding --
PR92999, PR99764, PR91381 and PR91041. I am happy to re-ping or drop any
of them; I did not want to hold these two behind that.
Prepared with the assistance of an AI coding tool, recorded per patch with
Assisted-by:. I reviewed and verified every line.
Dominic P (2):
arm: initialise the speculation barrier libfunc for every ABI
[PR126164]
arm: emit the doubleword auto-increment cases ldrd cannot express
[PR97807]
gcc/config/arm/arm.cc | 81 ++++++++++++++++++++++++++------
gcc/testsuite/gcc.target/arm/pr126164.c | 14 ++++++
gcc/testsuite/gcc.target/arm/pr97807-2.c | 22 +++++++++
gcc/testsuite/gcc.target/arm/pr97807.c | 25 ++++++++++
4 files changed, 128 insertions(+), 14 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/arm/pr126164.c
create mode 100644 gcc/testsuite/gcc.target/arm/pr97807-2.c
create mode 100644 gcc/testsuite/gcc.target/arm/pr97807.c
--
2.55.0