Bug 56882 - ICE: when compiling gegl
Summary: ICE: when compiling gegl
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-08 18:52 UTC by xperience
Modified: 2017-07-21 21:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-04-09 00:00:00


Attachments
preprocessed file (90.68 KB, application/octet-stream)
2013-04-08 18:52 UTC, xperience
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xperience 2013-04-08 18:52:38 UTC
Created attachment 29829 [details]
preprocessed file

I'm using gentoo on AMD64 machine Pilediver core A10-4600M processor, when compiling gegl 0.2.0 I got, I was compiling it from time to time with older versions of gcc and that same set of CFLAGS, sometimes with problems or not, but that was the first time to ICE in compiler:

gegl-processor.c: In function 'gegl_processor_get_property':
gegl-processor.c:223:1: internal compiler error: Segmentation fault
 gegl_processor_get_property (GObject    *gobject,
-----------------------------------------------------

CFLAGS="-O3 -mtune=native -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -flto -fuse-linker-plugin -fPIC"

-----------------------------------------------------
ICE will not happen when I strip graphite flags

-----------------------------------------------------



Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.8.0/work/gcc-4.8.0/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --with-ppl --with-cloog --disable-isl-version-check --with-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --with-multilib-list=m32,m64 --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/python --enable-checking=release --disable-libgcj --enable-libstdcxx-time --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.0 p1.1, pie-0.5.5'
Thread model: posix
gcc version 4.8.0 (Gentoo 4.8.0 p1.1, pie-0.5.5)
Comment 1 Jakub Jelinek 2013-04-09 09:36:19 UTC
Can't reproduce, though of course if you specify -march=native -mtune=native, you need to provide info from running that together with -v, because otherwise it is completely useless to people testing it on other HW.
Tried
-mavx -mfma -mf16c -maes -mpclmul -march=btver2 -mtune=btver2
-mavx -mfma -mf16c -maes -mpclmul -march=bdver2 -mtune=bdver2
instead of -march=native -mtune=native here.  Also, is the ICE already during compilation of this preprocessed testcase, or is the ICE during lto phase (then of course to reproduce you'd need to provide all preprocessed sources, ideally reduced).
Comment 2 xperience 2013-04-09 20:03:30 UTC
Compiler ICE's during compile phase, without LTO.
Previous versions of GCC ie. 4.7.1 or 4.6.3 doesn't ICE,

and output of 
gcc -O3 -mtune=native -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -E -v - </dev/null 2>&1 | grep cc1

is

 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0/cc1 -E -quiet -v - -march=bdver2 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mabm -mlwp -mfma -mfma4 -mxop -mbmi -mno-bmi2 -mtbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mf16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave -mno-xsaveopt --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=bdver2 -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -O3


it seems that compiler will not ICE when i don't have -floop-parallelize-all in my CFLAGS


full command from makefile:
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../gegl -I../../gegl -I../../gegl/property-types -I../../gegl/property-types -I../../gegl/buffer -I../../gegl/buffer -I../../gegl/opencl -I../../gegl/opencl -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/babl-0.1 -O3 -mtune=native -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -mmmx -msse -ftree-vectorize -ffast-math -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -DG_LOG_DOMAIN=\"GEGL-\"__FILE__ -MT gegl-processor.lo -MD -MP -MF .deps/gegl-processor.Tpo -c gegl-processor.c  -fPIC -DPIC -o .libs/gegl-processor.o
Comment 3 Yury Gribov 2017-07-21 21:46:01 UTC
I couldn't repro either, neither w/ 4.8.0, not w/ trunk.  Perhaps you could try checking with fresh GCC and provide up-to-date repro if it still fails?