https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98189
--- Comment #6 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> --- This is still reproducible with GCC 14: (unstable-sh4-sbuild)glaubitz@adams:~/gdal/gdal-3.9.3+dfsg/build-py3.12/frmts/pcraster$ /usr/bin/g++-14 -DDONT_DEPRECATE_SPRINTF -DGDAL_COMPILATION -DUSE_IN_GDAL -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/apps -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/alg -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/gcore -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/build-py3.12/gcore -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/port -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/build-py3.12/port -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/ogr -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/ogr/ogrsf_frmts -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/libcsf -g -O2 -ffile-prefix-map=/home/glaubitz/gdal/gdal-3.9.3+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fPIC -Wall -Wextra -Winit-self -Wunused-parameter -Wmissing-declarations -Wlogical-op -Wshadow -Wmissing-include-dirs -Wformat -Werror=format-security -Wno-format-nonliteral -Werror=vla -Wno-clobbered -Wdate-time -Wnull-dereference -Wextra-semi -Wfloat-conversion -Wnon-virtual-dtor -Woverloaded-virtual -Wsuggest-override -fno-operator-names -Wzero-as-null-pointer-constant -std=gnu++17 -MD -MT frmts/pcraster/CMakeFiles/gdal_PCRaster.dir/pcrasterutil.cpp.o -MF CMakeFiles/gdal_PCRaster.dir/pcrasterutil.cpp.o.d -o CMakeFiles/gdal_PCRaster.dir/pcrasterutil.cpp.o -c /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp during RTL pass: mach /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp: In function 'void castValuesToBooleanRange(void*, size_t, CSF_CR)': /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp:785:1: internal compiler error: Segmentation fault 785 | } | ^ 0x15af0a5 internal_error(char const*, ...) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions. (unstable-sh4-sbuild)glaubitz@adams:~/gdal/gdal-3.9.3+dfsg/build-py3.12/frmts/pcraster$ With an LRA-enabled GCC 15 (20241004) based on Oleg Endo's tree with the additional patches 59432 and 59550 from PR target/55212, I'm getting a different ICE: (unstable-sh4-sbuild)glaubitz@adams:~/gdal/gdal-3.9.3+dfsg/build-py3.12/frmts/pcraster$ /usr/lib/gcc-snapshot/bin/c++ -DDONT_DEPRECATE_SPRINTF -DGDAL_COMPILATION -DUSE_IN_GDAL -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/apps -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/alg -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/gcore -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/build-py3.12/gcore -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/port -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/build-py3.12/port -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/ogr -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/ogr/ogrsf_frmts -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts -I/home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/libcsf -g -O2 -ffile-prefix-map=/home/glaubitz/gdal/gdal-3.9.3+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fPIC -Wall -Wextra -Winit-self -Wunused-parameter -Wmissing-declarations -Wlogical-op -Wshadow -Wmissing-include-dirs -Wformat -Werror=format-security -Wno-format-nonliteral -Werror=vla -Wno-clobbered -Wdate-time -Wnull-dereference -Wextra-semi -Wfloat-conversion -Wnon-virtual-dtor -Woverloaded-virtual -Wsuggest-override -fno-operator-names -Wzero-as-null-pointer-constant -std=gnu++17 -MD -MT frmts/pcraster/CMakeFiles/gdal_PCRaster.dir/pcrasterutil.cpp.o -MF CMakeFiles/gdal_PCRaster.dir/pcrasterutil.cpp.o.d -o CMakeFiles/gdal_PCRaster.dir/pcrasterutil.cpp.o -c /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp: In function 'std::string valueScale2String(CSF_VS)': /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp:149:13: note: non-delegitimized UNSPEC UNSPEC_GOTOFF (6) found in variable location 149 | std::string valueScale2String(CSF_VS valueScale) | ^~~~~~~~~~~~~~~~~ /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp:149:13: note: non-delegitimized UNSPEC UNSPEC_GOTOFF (6) found in variable location /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp: In function 'std::string cellRepresentation2String(CSF_CR)': /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp:213:13: note: non-delegitimized UNSPEC UNSPEC_GOTOFF (6) found in variable location 213 | std::string cellRepresentation2String(CSF_CR cellRepresentation) | ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp:213:13: note: non-delegitimized UNSPEC UNSPEC_GOTOFF (6) found in variable location during RTL pass: mach /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp: In function 'void castValuesToBooleanRange(void*, size_t, CSF_CR)': /home/glaubitz/gdal/gdal-3.9.3+dfsg/frmts/pcraster/pcrasterutil.cpp:785:1: internal compiler error: RTL flag check: INSN_UID used with unexpected rtx code 'smin' in INSN_UID, at rtl.h:1455 785 | } | ^ 0x1ba026f diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag*, diagnostic_t) ???:0 0x1baf00f internal_error(char const*, ...) ???:0 0x653c35 rtl_check_failed_flag(char const*, rtx_def const*, char const*, int, char const*) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions. (unstable-sh4-sbuild)glaubitz@adams:~/gdal/gdal-3.9.3+dfsg/build-py3.12/frmts/pcraster$