public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98189] New: [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal
@ 2020-12-08 0:10 glaubitz at physik dot fu-berlin.de
2020-12-08 0:13 ` [Bug target/98189] " glaubitz at physik dot fu-berlin.de
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-12-08 0:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98189
Bug ID: 98189
Summary: [SH] ICE and segmentation fault with -O2 and without
-fno-guess-branch-probability when building gdal
Product: gcc
Version: 10.2.0
URL: https://buildd.debian.org/status/fetch.php?pkg=gdal&ar
ch=sh4&ver=3.2.0%2Bdfsg-1%7Eexp1&stamp=1604338136&raw=
0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: glaubitz at physik dot fu-berlin.de
CC: kkojima at gcc dot gnu.org, olegendo at gcc dot gnu.org
Target Milestone: ---
Target: sh*-*-*
Trying to build gdal on Debian unstable/sh4 fails with segmentation fault at
-O1 and -O2 optimization levels unless -fno-guess-branch-probability is
specified:
(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)
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-10/README.Bugs> for instructions.
(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
-fno-guess-branch-probability
/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)
/build/gdal-rdrvrf/gdal-3.2.0+dfsg/libtool: line 1764: warning: setlocale:
LC_ALL: cannot change locale (en_US.UTF-8)
(sid-sh4-sbuild)root@epyc:/build/gdal-rdrvrf/gdal-3.2.0+dfsg/frmts/pcraster#
Attaching source and intermediate files.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/98189] [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal
2020-12-08 0:10 [Bug target/98189] New: [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal glaubitz at physik dot fu-berlin.de
@ 2020-12-08 0:13 ` glaubitz at physik dot fu-berlin.de
2020-12-08 8:21 ` marxin at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-12-08 0:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98189
--- Comment #1 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
Created attachment 49703
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49703&action=edit
Sources and preprocessed source for pcrasterutil.cpp
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/98189] [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal
2020-12-08 0:10 [Bug target/98189] New: [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal glaubitz at physik dot fu-berlin.de
2020-12-08 0:13 ` [Bug target/98189] " glaubitz at physik dot fu-berlin.de
@ 2020-12-08 8:21 ` marxin at gcc dot gnu.org
2020-12-08 15:43 ` glaubitz at physik dot fu-berlin.de
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-08 8:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98189
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Unfortunately, I can't reproduce that with a cross compiler.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/98189] [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal
2020-12-08 0:10 [Bug target/98189] New: [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal glaubitz at physik dot fu-berlin.de
2020-12-08 0:13 ` [Bug target/98189] " glaubitz at physik dot fu-berlin.de
2020-12-08 8:21 ` marxin at gcc dot gnu.org
@ 2020-12-08 15:43 ` glaubitz at physik dot fu-berlin.de
2020-12-08 19:51 ` marxin at gcc dot gnu.org
2021-10-09 17:24 ` egallager at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-12-08 15:43 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/98189] [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal
2020-12-08 0:10 [Bug target/98189] New: [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal glaubitz at physik dot fu-berlin.de
` (2 preceding siblings ...)
2020-12-08 15:43 ` glaubitz at physik dot fu-berlin.de
@ 2020-12-08 19:51 ` marxin at gcc dot gnu.org
2021-10-09 17:24 ` egallager at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-08 19:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98189
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2020-12-08
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Can you please also reduce the test-case as described here:
https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/98189] [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal
2020-12-08 0:10 [Bug target/98189] New: [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal glaubitz at physik dot fu-berlin.de
` (3 preceding siblings ...)
2020-12-08 19:51 ` marxin at gcc dot gnu.org
@ 2021-10-09 17:24 ` egallager at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: egallager at gcc dot gnu.org @ 2021-10-09 17:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98189
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC| |egallager at gcc dot gnu.org
--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
assuming that since this is from gdal, it's an ice-on-valid
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-09 17:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 0:10 [Bug target/98189] New: [SH] ICE and segmentation fault with -O2 and without -fno-guess-branch-probability when building gdal glaubitz at physik dot fu-berlin.de
2020-12-08 0:13 ` [Bug target/98189] " glaubitz at physik dot fu-berlin.de
2020-12-08 8:21 ` marxin at gcc dot gnu.org
2020-12-08 15:43 ` glaubitz at physik dot fu-berlin.de
2020-12-08 19:51 ` marxin at gcc dot gnu.org
2021-10-09 17:24 ` egallager at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).