Hello Federico,
On Sat, 2026-10-31 at 21:23 +0100, Federico Molara wrote:
> I maintain libvisual-plugins in Debian. Could someone with a sh4-targeting
> GCC 17 (native or cross) please try the attached preprocessed source and
> advise whether this looks related to GCC PR 126167, or warrants a separate
> compiler bug report?
>
> The sh4 build fails in the JESS actor's stars_create_state function:
>
> draw.c:548:1: error: unable to find a register to spill
>
> The failing instruction is an indexed float store at draw.c:541:23,
> pattern movsf_ie. The attached file comes from the -5 buildd failure;
> this source file is unchanged in 1:0.4.2+dfsg-6, which also failed on sh4.
> Build status:
> https://buildd.debian.org/status/package.php?p=libvisual-plugins&suite=sid
>
> On 31 October I replayed the same file in a temporary amd64 unstable
> chroot using Debian cross-compilers:
>
> gcc-15-sh4-linux-gnu 15.3.0-4cross1:
> -O2 -fPIC, including explicit -mlra: compiles successfully.
>
> gcc-16-sh4-linux-gnu 16.2.0-3cross1:
> -O2 -fPIC, including explicit -mlra: fails with the diagnostic above.
> -O2 -fPIC -mno-lra, or -O1 -fPIC: compiles successfully.
>
> Both compilers report -mlra enabled by default. This establishes a
> difference between these Debian compiler builds, not an upstream bisect.
> The alternative flags are diagnostic controls only; I have not added a
> packaging workaround or tested the generated code at runtime.
>
> To reproduce after decompressing buildd-draw.i.gz:
>
> sh4-linux-gnu-gcc-17 -g -O2 -fstack-protector-strong \
> -Wformat -Werror=format-security -fPIC \
> -c buildd-draw.i -o draw.o
>
> Use sh4-linux-gnu-gcc-16 for the tested failing command, or gcc-17 with a
> native sh4 compiler. The uncompressed file's SHA-256 is:
> 65f752272467c6cb5aee6d90483783acf82ca54271540139d950efb0e7ec5b00
>
> I found that PR 55212 was closed as fixed for GCC 17, and PR 126167 covers
> R0 spill failures, but I have not established that our case is a duplicate:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126167
>
> I could not find a packaged GCC 17 cross-compiler for sh4 in unstable or
> experimental, so I have not tested this reproducer with GCC 17. This is
> a request for a compiler-level check and advice, not a buildd give-back.
> The reproducer is not minimized; compiler versions/configuration and the
> GCC 16 diagnostic are attached as well.
Thanks for caring about sh4!
I have done a quick test with an unstable sh4 chroot using GCC 17 as the
default compiler and your package builds fine with it on sh4:
dpkg-deb: building package 'libvisual-0.4-plugins' in '../libvisual-0.4-plugins_0.4.2+dfsg-6_sh4.deb'.
dpkg-deb: building package 'libvisual-0.4-plugins-dbgsym' in '../libvisual-0.4-plugins-dbgsym_0.4.2+dfsg-6_sh4.deb'.
dpkg-genbuildinfo --build=any -O../libvisual-plugins_0.4.2+dfsg-6_sh4.buildinfo
dpkg-genchanges --build=any -O../libvisual-plugins_0.4.2+dfsg-6_sh4.changes
dpkg-genchanges: info: binary-only arch-specific upload (source code and arch-indep packages not included)
dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913