https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127843
Bug ID: 127843
Summary: [17 regression] ICE when building libgcc2 for hppa
(RTL flag check: CONSTANT_POOL_ADDRESS_P used with
unexpected rtx code 'const_double' in
pa_legitimate_constant_p, at config/pa/pa.cc:11030)
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: build, ice-on-valid-code, rtl-checking
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
CC: danglin at gcc dot gnu.org
Target Milestone: ---
This needs --enable-checking=yes,extra,rtl (just rtl probably):
```
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/build/./gcc/xgcc
-B/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/build/./gcc/
-B/usr/hppa2.0-unknown-linux-gnu/bin/ -B/usr/hppa2.0-unknown-linux-gnu/lib/
-isystem /usr/hppa2.0-unknown-linux-gnu/include -isystem
/usr/hppa2.0-unknown-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-error=narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -fPIC -DELF=1 -DLINUX=1 -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector -fno-stack-clash-protection -fPIC -DELF=1 -DLINUX=1 -I.
-I. -I../.././gcc
-I/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc
-I/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/.
-I/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/../gcc
-I/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/../include
-DHAVE_CC_TLS -o _powisf2.o -MT _powisf2.o -MD -MP -MF _powisf2.dep
-DL_powisf2 -c
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/libgcc2.c
-fvisibility=hidden -DHIDE_EXPORTS
during RTL pass: expand
In file included from
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/libgcc2.c:56:
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/libgcc2.c:
In function '__powisf2':
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/libgcc2.h:269:17:
internal compiler error: RTL flag check: CONSTANT_POOL_ADDRESS_P used with
unexpected rtx code 'const_double' in pa_legitimate_constant_p, at
config/pa/pa.cc:11030
269 | #define __N(a) __ ## a
| ^~
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/libgcc2.h:352:33:
note: in expansion of macro '__N'
352 | #define __powisf2 __N(powisf2)
| ^~~
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/libgcc2.c:2548:16:
note: in expansion of macro '__powisf2'
2548 | # define NAME __powisf2
| ^~~~~~~~~
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/libgcc2.c:2563:1:
note: in expansion of macro 'NAME'
2563 | NAME (TYPE x, int m)
| ^~~~
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/build/./gcc/cc1
-quiet -I . -I . -I ../.././gcc -I
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc
-I
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/.
-I
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/../gcc
-I
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/../include
-iprefix
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/build/gcc/../../../../lib/gcc/hppa2.0-unknown-linux-gnu/17/
-isystem
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/build/./gcc/include
-isystem
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/build/./gcc/include-fixed
-MD _powisf2.d -MF _powisf2.dep -MP -MT _powisf2.o -D IN_GCC -D
CROSS_DIRECTORY_STRUCTURE -D ELF=1 -D LINUX=1 -D IN_LIBGCC2 -D ELF=1 -D LINUX=1
-D HAVE_CC_TLS -D L_powisf2 -D HIDE_EXPORTS -isystem
/usr/hppa2.0-unknown-linux-gnu/include -isystem
/usr/hppa2.0-unknown-linux-gnu/sys-include -isystem ./include
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/libgcc/libgcc2.c
-quiet -dumpbase _powisf2.c -dumpbase-ext .c -g -g -g -O2 -O2 -O2 -Wextra -Wall
-Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -fbuilding-libgcc
-fno-stack-protector -fno-stack-clash-protection -fPIC -fvisibility=hidden -o
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/temp/ccuo71Hh.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://bugs.gentoo.org/> for instructions.
make[2]: *** [Makefile:516: _powisf2.o] Error 1
make[2]: Leaving directory
'/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/build/hppa2.0-unknown-linux-gnu/libgcc'
make[1]: *** [Makefile:13320: all-target-libgcc] Error 2
make: *** [Makefile:1097: all] Error 2
```
```
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/build/gcc
# ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: hppa2.0-unknown-linux-gnu
Configured with:
/var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-17.0.0_p20261011/work/gcc-17-20261011/configure
--host=x86_64-pc-linux-gnu --target=hppa2.0-unknown-linux-gnu
--build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/hppa2.0-unknown-linux-gnu/gcc-bin/17
--includedir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/17/include
--datadir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/17
--mandir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/17/man
--infodir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/17/info
--with-gxx-include-dir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/17/include/g++-v17
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/hppa2.0-unknown-linux-gnu/17/python
--enable-libphobos --enable-languages=c,c++,d,fortran,ada,jit --enable-obsolete
--enable-secureplt --disable-werror --with-system-zlib --disable-nls
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo
17.0.0_p20261011 p16' --with-gcc-major-version-only --enable-libstdcxx-time
--enable-lto --disable-libstdcxx-pch --enable-linker-build-id --enable-libada
--enable-poison-system-directories
--with-sysroot=/usr/hppa2.0-unknown-linux-gnu --disable-gcov
--disable-bootstrap --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --enable-libgomp --disable-libssp
--disable-systemtap --enable-valgrind-annotations --disable-valgrind-interop
--disable-vtable-verify --disable-libvtv --without-zstd --without-isl
--disable-libsanitizer --enable-default-pie --enable-host-pie
--disable-default-ssp --disable-fixincludes
--with-gxx-libcxx-include-dir=/usr/include/c++/v1 --enable-host-shared
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20261011 (experimental) (Gentoo 17.0.0_p20261011 p16)
```