Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 702968 - =dev-libs/isl-0.22: gcc-9.2.0 graphite ICE regression with isl-0.22
Summary: =dev-libs/isl-0.22: gcc-9.2.0 graphite ICE regression with isl-0.22
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR92945
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-15 06:53 UTC by wolfwood
Modified: 2020-01-08 20:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,7.53 KB, text/plain)
2019-12-15 06:54 UTC, wolfwood
Details
gcc -v (gcc-info.txt,1.45 KB, text/plain)
2019-12-15 06:55 UTC, wolfwood
Details
scipy build log (scipy-1.1.0-build.log,618.50 KB, text/plain)
2019-12-15 06:55 UTC, wolfwood
Details
dav1d build log (dav1d-0.5.2-build.log,112.17 KB, text/plain)
2019-12-15 06:56 UTC, wolfwood
Details
reduced testcase for scipy emerge failure with gfortran-9.2.0 + isl-0.22 (scipy-graphite-ice.f,675 bytes, text/x-fortran)
2019-12-15 07:01 UTC, wolfwood
Details
a temporary workaround patch for dav1d (dav1d-graphite-ice-workaround.patch,211 bytes, patch)
2019-12-15 20:50 UTC, wolfwood
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description wolfwood 2019-12-15 06:53:56 UTC
both scipy-1.1.0 and dav1d-0.5.2 are failing to emerge with an Internal Compiler Error when using graphite, specifically -floop-nest-optimize. the packages compiled successfully when gcc was built against isl-0.21. dav1d-0.5.2 also compiles successfully with gcc-8.3.0.

I've created a minimal snippet to reproduce the gfortran ICE from scipy. The dav1d failure is only triggered during the linking phase of an LTO build, so attempting a reduction is more complex.

Additionaly the scipy failure happens at -O2 but not -O1, but the dav1d failure happens at -O3 not -O2.

Reproducible: Always

Steps to Reproduce:
sudo CFLAGS="-O2 -floop-nest-optimize" emerge -av1 scipy
or
sudo CFLAGS="-O3 -floop-nest-optimize -flto" emerge -av1 dav1d


Actual Results:  
during GIMPLE pass: graphite
scipy/special/specfun/specfun.f:4519:0:

 4519 |         SUBROUTINE CERZO(NT,ZO)
      | 
internal compiler error: Segmentation fault


during GIMPLE pass: graphite
../dav1d-0.5.2/tests/checkasm/looprestoration.c: In function ‘check_sgr.isra.0’:
../dav1d-0.5.2/tests/checkasm/looprestoration.c:118:13: internal compiler error: Segmentation fault

Expected Results:  
success

gcc-v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/9.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/python --enable-languages=c,c++,d,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 9.2.0-r2 p3' --disable-esp --enable-libstdcxx-time --with-build-config=bootstrap-lto --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-systemtap --enable-vtable-verify --enable-lto --with-isl --disable-isl-version-check --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 9.2.0 (Gentoo 9.2.0-r2 p3) 

emerge --info:
Portage 2.3.81 (python 3.6.9-final-0, default/linux/amd64/17.0, gcc-9.2.0, glibc-2.30-r3, 5.0.17-gentoo x86_64)
=================================================================
System uname: Linux-5.0.17-gentoo-x86_64-Intel-R-_Core-TM-_i9-7980XE_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:   131792656 total,  80489340 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 13 Dec 2019 06:30:01 +0000
Head commit of repository gentoo: 0e7997de21899535a9e093d8219930f9085f88ea
Head commit of repository sakaki-tools: 272fdb0791c36003b9dbe78dcb0b7c05309704b2

sh bash 5.0_p11
ld GNU gold (Gentoo 2.33.1 p1 2.33.1) 1.16
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.6 [disabled]
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9-r1::lto-overlay, 3.7.5-r2::lto-overlay
dev-util/ccache:          3.7.6::gentoo
dev-util/cmake:           3.16.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.33.1::gentoo
sys-devel/gcc:            8.3.0-r3::gentoo, 9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 

localrepo
    location: /usr/local/portage
    masters: gentoo

dlang
    location: /var/lib/layman/dlang
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/dlang.git
    masters: gentoo
    priority: 50

lto-overlay
    location: /var/lib/layman/lto-overlay
    sync-type: laymansync
    sync-uri: https://github.com/InBetweenNames/gentooLTO.git
    masters: gentoo mv
    priority: 50

mv
    location: /var/lib/layman/mv
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/user/mv.git
    masters: gentoo
    priority: 50

nest
    location: /var/lib/layman/nest
    sync-type: laymansync
    sync-uri: https://github.com/SpiderX/portage-overlay.git
    masters: gentoo
    priority: 50

sakaki-tools
    location: /usr/local/portage/sakaki-tools
    sync-type: git
    sync-uri: https://github.com/sakaki-/sakaki-tools.git
    masters: gentoo
    priority: 50

stefantalpalaru
    location: /var/lib/layman/stefantalpalaru
    sync-type: laymansync
    sync-uri: https://github.com/stefantalpalaru/gentoo-overlay.git
    masters: gentoo
    priority: 50

tastytea
    location: /var/lib/layman/tastytea
    sync-type: laymansync
    sync-uri: https://schlomp.space/tastytea/overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=36 -fuse-linker-plugin -falign-functions=24"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=36 -fuse-linker-plugin -falign-functions=24"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs --load-average --keep-going"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS=""
MAKEOPTS="-j36 -l36"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="256-color X acl alsa amd64 berkdb bzip2 cli crypt cxx dri elogind fortran gdbm gold graphite gtkstyle iconv ipv6 jumbo-build libedit libtirpc lto multilib ncurses nls nptl openmp pam pch pcre pgo pixbuf policykit prelink pulseaudio readline seccomp split-usr ssl sync-plugin-portage tcpd unicode vulkan xattr xft xinerama zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF NVPTX X86" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPT
Comment 1 wolfwood 2019-12-15 06:54:49 UTC
Created attachment 599556 [details]
emerge --info
Comment 2 wolfwood 2019-12-15 06:55:17 UTC
Created attachment 599558 [details]
gcc -v
Comment 3 wolfwood 2019-12-15 06:55:51 UTC
Created attachment 599560 [details]
scipy build log
Comment 4 wolfwood 2019-12-15 06:56:21 UTC
Created attachment 599562 [details]
dav1d build log
Comment 5 wolfwood 2019-12-15 07:01:44 UTC
Created attachment 599564 [details]
reduced testcase for scipy emerge failure with gfortran-9.2.0 + isl-0.22

run with the following:
gfortran-9.2.0 -O2 -floop-nest-optimize -c scipy-graphite-ice.f 

expected failure:
scipy-graphite-ice.f:16:72:

   16 | 30            ZQ=ZQ+ZW
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 30 at (1)
scipy-graphite-ice.f:20:72:

   20 | 35         ZO(NR)=Z
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 35 at (1)
during GIMPLE pass: graphite
scipy-graphite-ice.f:1:0:

    1 |         SUBROUTINE CERZO(NT,ZO)
      | 
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
Comment 6 wolfwood 2019-12-15 07:03:49 UTC
I guess I forgot to say in repoduction steps: requires gcc-9.2.0 emerged with USE=graphite
Comment 7 wolfwood 2019-12-15 07:13:01 UTC
also, the minimal testcase builds sucessfully with gfortran-8.3.0 as well.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-15 10:34:43 UTC
Reproduced crash on dav1d locally as well.

Thank you for reducing the fortran file!
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-15 11:10:20 UTC
Filed upstream bug as:
    https://gcc.gnu.org/PR92945
Comment 10 wolfwood 2019-12-15 20:50:06 UTC
Created attachment 599678 [details, diff]
a temporary workaround patch for dav1d

@pchome pointed out that the dav1d ICE is during building tests and so if you disable tests, the package emerges successfully.
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-08 20:15:07 UTC
Ended up being an isl-0.22 bug.
Comment 12 Larry the Git Cow gentoo-dev 2020-01-08 20:30:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e310853e6e93153062451b97a0750ccb1c3b419

commit 8e310853e6e93153062451b97a0750ccb1c3b419
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-01-08 20:29:11 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-01-08 20:30:02 +0000

    dev-libs/isl: fix SIGSEGV for gcc, bug #702968
    
    Picked proposed upstream patch from
    https://groups.google.com/forum/#!original/isl-development/Otz1QKZDpzA/71GkTvqkCAAJ
    
    Reported-by: wolfwood
    Closes: https://bugs.gentoo.org/702968
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-libs/isl/files/isl-0.22-bmap-nullderef.patch | 34 ++++++++++++++++
 dev-libs/isl/isl-0.22-r1.ebuild                  | 52 ++++++++++++++++++++++++
 2 files changed, 86 insertions(+)