https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98189
--- Comment #3 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> --- (In reply to Martin Liška from comment #2) > Unfortunately, I can't reproduce that with a cross compiler. Hmm, that's a pity. Just tried with the latest snapshot we have in Debian, same result: (sid-sh4-sbuild)root@epyc:/build/gdal-rdrvrf/gdal-3.2.0+dfsg/frmts/pcraster# gcc -v Using built-in specs. COLLECT_GCC=/usr/lib/gcc-snapshot/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/sh4-linux-gnu/11/lto-wrapper Target: sh4-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 20201204-1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,ada,c++,d,fortran,objc,obj-c++ --prefix=/usr/lib/gcc-snapshot --with-gcc-major-version-only --program-prefix= --enable-shared --enable-linker-build-id --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --disable-libphobos --enable-objc-gc=auto --enable-multiarch --disable-werror --with-cpu=sh4 --with-multilib-list=m4,m4-nofpu --enable-checking=yes --build=sh4-linux-gnu --host=sh4-linux-gnu --target=sh4-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.0.0 20201204 (experimental) [master revision b8dd0ef74dd:6f51f472f04:9715663f7db7ac57121c9a60dd0078787e274f66] (Debian 20201204-1) (sid-sh4-sbuild)root@epyc:/build/gdal-rdrvrf/gdal-3.2.0+dfsg/frmts/pcraster# (sid-sh4-sbuild)root@epyc:/build/gdal-rdrvrf/gdal-3.2.0+dfsg/frmts/pcraster# /bin/bash /build/gdal-rdrvrf/gdal-3.2.0+dfsg/libtool --mode=compile --silent --tag=CXX g++ -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/port -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/gcore -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/alg -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/ogr -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/ogr/ogrsf_frmts -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/gnm -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/apps -g -O2 -fdebug-prefix-map=/build/gdal-rdrvrf/gdal-3.2.0+dfsg=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fvisibility=hidden -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wextra-semi -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant -Wsuggest-override -Wimplicit-fallthrough -DGNM_ENABLED -Wdate-time -D_FORTIFY_SOURCE=2 -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/port -I/usr/include -I/usr/include/openjpeg-2.3 -I/usr/include -DGDAL_COMPILATION -DHAVE_XERCES -I/usr/include -I/usr/include/xercesc -Wdate-time -D_FORTIFY_SOURCE=2 -I/build/gdal-rdrvrf/gdal-3.2.0+dfsg/port -I/usr/include -I/usr/include/openjpeg-2.3 -I/usr/include -DGDAL_COMPILATION -DUSE_IN_GDAL -Ilibcsf -c -o ../o/pcrasterutil.lo pcrasterutil.cpp /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /build/gdal-rdrvrf/gdal-3.2.0+dfsg/libtool: line 1764: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) pcrasterutil.cpp: In function 'std::string valueScale2String(CSF_VS)': pcrasterutil.cpp:130:13: note: non-delegitimized UNSPEC UNSPEC_GOTOFF (6) found in variable location 130 | std::string valueScale2String( | ^~~~~~~~~~~~~~~~~ pcrasterutil.cpp:130:13: note: non-delegitimized UNSPEC UNSPEC_GOTOFF (6) found in variable location pcrasterutil.cpp: In function 'std::string cellRepresentation2String(CSF_CR)': pcrasterutil.cpp:182:13: note: non-delegitimized UNSPEC UNSPEC_GOTOFF (6) found in variable location 182 | std::string cellRepresentation2String( | ^~~~~~~~~~~~~~~~~~~~~~~~~ pcrasterutil.cpp:182:13: note: non-delegitimized UNSPEC UNSPEC_GOTOFF (6) found in variable location during RTL pass: mach pcrasterutil.cpp: In function 'void castValuesToBooleanRange(void*, size_t, CSF_CR)': pcrasterutil.cpp:674:1: internal compiler error: Segmentation fault 674 | } | ^ mmap: Permission denied Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions. (sid-sh4-sbuild)root@epyc:/build/gdal-rdrvrf/gdal-3.2.0+dfsg/frmts/pcraster# I'll test on real hardware next. If it also reproduces there, I'll check with gdb where the segfault occurs.