(Resent: the original cover letter did not reach the list; patches 1-5/5
of this series are already on the list and reference this message.)
This is a small batch of low-risk conformance and cleanup fixes for the
AArch32 (arm) backend, plus one shared arm/aarch64 conformance macro.
None of them changes code generation for existing sources; they add
missing predefined macros, silence a libgcc build warning, and fix two
static-analysis nits.
1/5 arm, aarch64: Define __ARM_ACLE predefined macro [PR70974]
The ACLE requires a conforming implementation to predefine
__ARM_ACLE; GCC never did on either Arm port, so portable code
guarding <arm_acle.h> on __ARM_ACLE skipped the intrinsics.
PR70974 itself was reported on an AArch64 system, so this patch
covers both ports (arm-c.cc and aarch64-c.cc) and the PR is
properly closed by it. The gap has real-world fallout: Ceph's
cmake feature detection stopped trusting __ARM_ACLE because GCC
never defines it (Ceph tracker 19386, citing this PR), and
Crypto++ hit the same failure (cryptopp issue 238). The value
200 (ACLE 2.0, the historical 100*major+minor encoding) is what
clang predefines on 32-bit Arm and matches the intrinsic surface
GCC provides; both ports intentionally agree on it.
2/5 libgcc: Fix -Wcast-qual warning in the arm unwinder [PR64606]
Of the warnings PR64606 reports, the fp16.c -Wmissing-prototypes
ones are already fixed upstream; this removes the remaining
-Wcast-qual warning in unwind-arm-common.inc. Build-warning
cleanup only.
3/5 arm: Fix two format/argument type mismatches [PR71175]
Two printf-style format/argument mismatches in the arm backend
found by static analysis. No change in generated code.
4/5 arm: Fix stale comment reference to removed pe.c [PR91041]
arm-protos.h still claimed its prototypes were defined in "arm.cc
and pe.c". The ARM_PE code the PR originally asked to remove is
already gone from the tree; this comment was the last remnant, so
the PR's cleanup completes here. Comment-only NFC.
5/5 arm: Define __ILP32__ and _ILP32 data-model macros [PR106930]
AArch32 always uses the ILP32 data model but, unlike the other
ILP32 GCC targets, did not predefine __ILP32__ / _ILP32.
Conformance fix.
Testing (no native bootstrap):
* arm side -- cross arm-none-eabi (--without-headers --with-newlib),
base vs the 5-patch stack: arm.exp 1269 -> 1270 expected passes
(the only change is the new ilp32-macro.c); acle.exp 56 -> 56 expected
passes with no pre-existing result changed -- the only delta is the new
acle/pr70974.c, which reports excess errors in this bare cross config
purely because <arm_acle.h> pulls in <stdint.h>, absent under
--without-headers (the same artifact behind the 14 pre-existing acle
FAILs there). Verified directly with target headers present: the test
compiles cleanly on the patched compiler and fails on the unpatched
base with the intended "#error __ARM_ACLE is not defined". Patched
cc1 predefines __ARM_ACLE=200, __ILP32__=1, _ILP32=1; base predefines
none; no other predefine is disturbed.
* aarch64 side (new in this revision of 1/5) -- cross
aarch64-linux-gnu (--without-headers), base vs patched at current
origin/master: the 5-patch series applies with
git am; the base compiler predefines no __ARM_ACLE (checked with
-E -dM) while the patched one predefines __ARM_ACLE=200, so the new
test's #ifndef/#error guard fails on base and passes when patched.
gcc.target/aarch64 aarch64.exp is IDENTICAL base vs patched (4345
expected passes and every other tally unchanged); acle.exp shows no
pre-existing result change -- the only delta is the new
acle/pr70974.c, which in this bare config reports excess errors only
because <arm_acle.h> pulls in <stdint.h> (absent under
--without-headers); with a standalone <stdint.h> provided the test
compiles cleanly on the patched compiler.
PR target/70974
PR target/64606
PR target/71175
PR target/91041
PR target/106930
This series was prepared with the assistance of an AI coding tool. Every line
of code, every test and every measurement was written, reviewed and verified by
the author, who takes responsibility for the patch; the Signed-off-by on each
commit certifies the Developer Certificate of Origin.
Dominic P (5):
arm, aarch64: Define __ARM_ACLE predefined macro [PR70974]
libgcc: Fix -Wcast-qual warning in the arm unwinder [PR64606]
arm: Fix two format/argument type mismatches [PR71175]
arm: Fix stale comment reference to removed pe.c [PR91041]
arm: Define __ILP32__ and _ILP32 data-model macros [PR106930]
gcc/config/aarch64/aarch64-c.cc | 4 ++++
gcc/config/arm/arm-c.cc | 11 ++++++++++
gcc/config/arm/arm-protos.h | 2 +-
gcc/config/arm/arm.cc | 4 ++--
.../gcc.target/aarch64/acle/pr70974.c | 21 +++++++++++++++++++
gcc/testsuite/gcc.target/arm/acle/pr70974.c | 20 ++++++++++++++++++
gcc/testsuite/gcc.target/arm/ilp32-macro.c | 19 +++++++++++++++++
libgcc/unwind-arm-common.inc | 5 +++--
8 files changed, 81 insertions(+), 5 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/aarch64/acle/pr70974.c
create mode 100644 gcc/testsuite/gcc.target/arm/acle/pr70974.c
create mode 100644 gcc/testsuite/gcc.target/arm/ilp32-macro.c
--
2.55.0