[Bug lto/89497] New: [8.2 regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled

darkkirb at darkkirb dot de gcc-bugzilla@gcc.gnu.org
Mon Feb 25 19:29:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497

            Bug ID: 89497
           Summary: [8.2 regression] ICE caused by Segmentation Fault when
                    compiling cups 2.2.10 with LTO flags enabled
           Product: gcc
           Version: 8.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: darkkirb at darkkirb dot de
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

I have found a Regression in 8.3 involving cups 2.2.10 and LTO on Gentoo Linux
(x86_64). The package built fine with the C/LDFLAGS found below on 8.2, making
me believe it was recently introduced. 
I have not yet tested this out on any recent development version.

Steps to reproduce:

1. Have the following variables set and exported:
  a) CFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize
-fipa-pta -fno-semantic-interposition -flto=8 -fuse-linker-plugin -pipe
-falign-functions=32 -fPIC"
  b) CXXFLAGS="${CFLAGS}"
  c) LDFLAGS="${CFLAGS} -Wl,--hash-style=gnu"
2. untar the cups 2.2.10 release tarball and go into its directory
3. CC=gcc CXX=g++ ./configure
4. make -j$(nproc) libs

The compiler will report an ICE:

during GIMPLE pass: vrp
ppd-localize.c: In function ‘ppdLocalize’:
ppd-localize.c:51:1: internal compiler error: Segmentation fault
 ppdLocalize(ppd_file_t *ppd)  /* I - PPD file */
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.

You can see the full link command below.

Thanks for making GCC better every day.

GCC Version: 8.3.0 (Gentoo 8.3.0 p1.0)
Target: x86_64-pc-linux-gnu
Configure flags: --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/8.3.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.3.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.3.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/8.3.0/python
--enable-languages=c,c++,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 8.3.0 p1.0' --disable-esp --enable-libstdcxx-time
--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-libmpx --disable-systemtap
--enable-vtable-verify --enable-lto --with-isl --disable-isl-version-check
--enable-default-pie --enable-default-ssp

Full offending command line:
x86_64-pc-linux-gnu-gcc -m32  -L../cgi-bin -L../cups -L../filter -L../ppdc
-L../scheduler -march=native -O3 -fgraphite-identity -floop-nest-optimize
-fipa-pta -fno-semantic-interposition -flto=8 -fuse-linker-plugin -pipe
-falign-functions=32 -fPIC -Wl,--hash-style=gnu  -fPIE -pie -Wall
-Wno-format-y2k -Wunused -Wno-unused-result -Wsign-conversion -fPIC -Os -g
-fstack-protector -Wno-format-truncation -Wno-tautological-compare
-D_GNU_SOURCE -L../cups -march=native -O3 -fgraphite-identity
-floop-nest-optimize -fipa-pta -fno-semantic-interposition -flto=8
-fuse-linker-plugin -pipe -falign-functions=32 -fPIC -Wl,--hash-style=gnu
-Wl,-soname,`basename libcups.so.2` -shared -Wall -Wno-format-y2k -Wunused
-Wno-unused-result -Wsign-conversion -fPIC -Os -g -fstack-protector
-Wno-format-truncation -Wno-tautological-compare -D_GNU_SOURCE -o libcups.so.2
adminutil.o array.o auth.o backchannel.o backend.o debug.o dest.o dest-job.o
dest-localization.o dest-options.o dir.o encode.o file.o getdevices.o
getifaddrs.o getputfile.o globals.o hash.o http.o http-addr.o http-addrlist.o
http-support.o ipp.o ipp-support.o langprintf.o language.o md5.o md5passwd.o
notify.o options.o ppd.o ppd-attr.o ppd-cache.o ppd-conflicts.o ppd-custom.o
ppd-emit.o ppd-localize.o ppd-mark.o ppd-page.o ppd-util.o pwg-media.o
request.o sidechannel.o snmp.o snprintf.o string.o tempfile.o thread.o tls.o
transcode.o usersys.o util.o  \
        -lgnutls  -lpthread -lm -lcrypt   -lz -lz

LDFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -fipa-pta
-fno-semantic-interposition -flto=8 -fuse-linker-plugin -pipe
-falign-functions=32 -fPIC -Wl,--hash-style=gnu"

The libraries named by the previous command line are not in an inconsistent
state (= they are all shared libraries or static LTO 7.1 libraries)

Error output of that command:
during GIMPLE pass: vrp
ppd-localize.c: In function ‘ppdLocalize’:
ppd-localize.c:51:1: internal compiler error: Segmentation fault
 ppdLocalize(ppd_file_t *ppd)  /* I - PPD file */
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.


More information about the Gcc-bugs mailing list