[gcc r17-1565] testsuite: Skip gcc.dg/lto/toplevel-extended-asm-1 etc. on 64-bit Solaris/SPARC
Rainer Orth
ro@gcc.gnu.org
Mon Jun 15 12:17:05 GMT 2026
https://gcc.gnu.org/g:4141aa41c51798ad7bd77e6da31bdd86f11a471d
commit r17-1565-g4141aa41c51798ad7bd77e6da31bdd86f11a471d
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date: Mon Jun 15 14:16:37 2026 +0200
testsuite: Skip gcc.dg/lto/toplevel-extended-asm-1 etc. on 64-bit Solaris/SPARC
Two LTO tests FAIL on 64-bit Solaris/SPARC:
FAIL: gcc.dg/lto/toplevel-extended-asm-1 c_lto_toplevel-extended-asm-1_0.o-c_lto_toplevel-extended-asm-1_1.o link, -O2 -flto -flto-partition=1to1 -no-pie
FAIL: gcc.dg/lto/toplevel-simple-asm-1 c_lto_toplevel-simple-asm-1_0.o-c_lto_toplevel-simple-asm-1_1.o link, -O2 -flto -flto-toplevel-asm-heuristics -flto-partition=1to1 -no-pie
FAIL: gcc.dg/lto/toplevel-simple-asm-1 c_lto_toplevel-simple-asm-1_0.o-c_lto_toplevel-simple-asm-1_1.o link, -O2 -flto -flto-toplevel-asm-heuristics -flto-partition=cache -no-pie
FAIL: gcc.dg/lto/toplevel-simple-asm-1 c_lto_toplevel-simple-asm-1_0.o-c_lto_toplevel-simple-asm-1_1.o link, -O2 -flto -flto-toplevel-asm-heuristics -flto-partition=max -no-pie
They always fail to link like
ld: fatal: relocation error: R_SPARC_32: file c_lto_toplevel-extended-asm-1_1.o: symbol .text (section): value 0x100001340 does not fit
The same error has been present with gld all along, but was only
recently introduced in Solaris ld as discussed in binutils PR ld/25802.
It doesn't occur on Linux/sparc64 which uses a different text start
address.
Tested on sparcv9-sun-solaris2.11, sparc64-unknown-linux-gnu, and
x86_64-pc-linux-gnu.
2026-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
* gcc.dg/lto/toplevel-extended-asm-1_0.c: Skip on 64-bit
Solaris/SPARC.
* gcc.dg/lto/toplevel-simple-asm-1_0.c: Likewise.
Diff:
---
gcc/testsuite/gcc.dg/lto/toplevel-extended-asm-1_0.c | 1 +
gcc/testsuite/gcc.dg/lto/toplevel-simple-asm-1_0.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/lto/toplevel-extended-asm-1_0.c b/gcc/testsuite/gcc.dg/lto/toplevel-extended-asm-1_0.c
index ddceaf6b5035..6082fbe11662 100644
--- a/gcc/testsuite/gcc.dg/lto/toplevel-extended-asm-1_0.c
+++ b/gcc/testsuite/gcc.dg/lto/toplevel-extended-asm-1_0.c
@@ -1,5 +1,6 @@
/* { dg-lto-do link } */
/* { dg-lto-options {{-O2 -flto -flto-partition=1to1 -no-pie} } } */
+/* { dg-skip-if "SPARC relocation overflow" { sparc*-*-solaris2* && lp64 } } */
void asm_fn();
void asm_fn_used();
diff --git a/gcc/testsuite/gcc.dg/lto/toplevel-simple-asm-1_0.c b/gcc/testsuite/gcc.dg/lto/toplevel-simple-asm-1_0.c
index 1fe576a4b54e..cd8ddfa7a0f5 100644
--- a/gcc/testsuite/gcc.dg/lto/toplevel-simple-asm-1_0.c
+++ b/gcc/testsuite/gcc.dg/lto/toplevel-simple-asm-1_0.c
@@ -1,5 +1,6 @@
/* { dg-lto-do link } */
/* { dg-lto-options { {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=1to1 -no-pie} {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=max -no-pie} {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=cache -no-pie}} } */
+/* { dg-skip-if "SPARC relocation overflow" { sparc*-*-solaris2* && lp64 } } */
void asm_fn();
void asm_fn_used();
More information about the Gcc-cvs
mailing list