[Bug c/46651] New: ICE with graphite enabled in cairo-1.8.10

2010-11-24 Thread saellaven at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651

   Summary: ICE with graphite enabled in cairo-1.8.10
   Product: gcc
   Version: 4.5.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: saella...@gmail.com


Created attachment 22523
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22523
preprocessed source

See also http://bugs.gentoo.org/show_bug.cgi?id=346445

uname -a
Linux death 2.6.36-gentoo-r3 #1 SMP Mon Nov 22 23:25:19 EST 2010 x86_64 AMD
Athlon(tm) 64 X2 Dual Core Processor 4400+ AuthenticAMD GNU/Linux

gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.1/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/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-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.5.1-r1 p1.3, pie-0.4.5'
Thread model: posix
gcc version 4.5.1 (Gentoo 4.5.1-r1 p1.3, pie-0.4.5) 



../doltcompile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I.
-I/usr/include/pixman-1  -I/usr/include/freetype2  
-I/usr/include/libpng14 -O2 -march=native -mtune=native
-pipe -ggdb -floop-interchange -floop-strip-mine -floop-block
-fgraphite-identity -finline-limit=1200 -MT cairo-cff-subset.lo -MD -MP -MF
.deps/cairo-cff-subset.Tpo -c -o cairo-cff-subset.lo cairo-cff-subset.c
cairo-cff-subset.c: In function 'cff_index_write':
cairo-cff-subset.c:313:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[3]: *** [cairo-cff-subset.lo] Error 1


[Bug c/46651] ICE with graphite enabled in cairo-1.8.10

2010-11-24 Thread saellaven at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651

--- Comment #1 from saellaven at gmail dot com 2010-11-25 02:28:37 UTC ---
compiles fine without any of -floop-interchange -floop-strip-mine -floop-block
-fgraphite-identity


[Bug tree-optimization/46651] ICE with graphite enabled in cairo-1.8.10

2010-11-26 Thread saellaven at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651

--- Comment #4 from saellaven at gmail dot com 2010-11-26 17:20:44 UTC ---
Created attachment 22540
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22540
preprocessed source without -march or -mtune

compiled with

./doltcompile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I.
-I/usr/include/pixman-1  -I/usr/include/freetype2  
-I/usr/include/libpng14 -O2  -save-temps -ggdb
-floop-interchange -floop-strip-mine -floop-block -fgraphite-identity
-finline-limit=1200 -MT cairo-cff-subset.lo -MD -MP -MF
.deps/cairo-cff-subset.Tpo -c -o cairo-cff-subset.lo cairo-cff-subset.c


[Bug tree-optimization/46651] ICE with graphite enabled in cairo-1.8.10

2010-11-26 Thread saellaven at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651

--- Comment #5 from saellaven at gmail dot com 2010-11-26 21:10:50 UTC ---
(In reply to comment #4)
> Created attachment 22540 [details]
> preprocessed source without -march or -mtune
> 
> compiled with
> 
> ./doltcompile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I.
> -I/usr/include/pixman-1  -I/usr/include/freetype2  
> -I/usr/include/libpng14 -O2  -save-temps -ggdb
> -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity
> -finline-limit=1200 -MT cairo-cff-subset.lo -MD -MP -MF
> .deps/cairo-cff-subset.Tpo -c -o cairo-cff-subset.lo cairo-cff-subset.c

to clarify, I got the same error when compiling without native optimizations

cairo-cff-subset.c: In function 'cff_index_write':
cairo-cff-subset.c:313:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.


[Bug tree-optimization/46651] ICE with graphite enabled in cairo-1.8.10

2010-11-29 Thread saellaven at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651

--- Comment #7 from saellaven at gmail dot com 2010-11-29 08:13:31 UTC ---
(In reply to comment #2)
> This crash was not in the 20101104 weekly snapshot, but has been in all
> snapshots since, including 20101125.

Based on this, I just did some manual bisecting. There appears to
be 3 patches added just before gcc-4.5.1-r1 was unmasked in portage:

20_all_gcc-4.5-fno-strict-overflow.patch
49_all_gcc-4.5-pr46491-kernel-miscompile.patch
90_all_gcc-4.5-graphite-ICE.patch

removal of all 3 resulted in a gcc that would compile cairo without ICE. 

I then dropped just the graphite-ICE patch. Result: successful compile
I then dropped just the pr46491-kernel-miscompile. Result: ICE
I then dropped just the fno-strict-overflow patch. Result: ICE

90_all_gcc-4.5-graphite-ICE.patch points to:
https://bugs.gentoo.org/345861
http://gcc.gnu.org/PR45314


[Bug tree-optimization/46651] ICE with graphite enabled in cairo-1.8.10

2010-11-29 Thread saellaven at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651

--- Comment #9 from saellaven at gmail dot com 2010-11-29 16:53:31 UTC ---
fails with the unmodified 20101125 snapshot. I'm going to revert the patch I
found above and will report back in a little while on whether or not it solves
it in vanillla gcc.

/usr/src/build/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/usr/src/build/./gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-4.5-20101125/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/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-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu
Thread model: posix
gcc version 4.5.2 20101125 (prerelease) (GCC)



/usr/src/build/./gcc/xgcc -B/usr/src/build/./gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
/usr/x86_64-pc-linux-gnu/include -DHAVE_CONFIG_H -I. -I..  -I.
-I/usr/include/pixman-1  -I/usr/include/freetype2 -I/usr/include/libpng14  
  -O2   -ggdb -floop-interchange -floop-strip-mine
-floop-block -fgraphite-identity -finline-limit=1200 -MT cairo-cff-subset.lo
-MD -MP -MF .deps/cairo-cff-subset.Tpo -c -o cairo-cff-subset.lo
cairo-cff-subset.c
cairo-cff-subset.c: In function 'cff_index_write':
cairo-cff-subset.c:313:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


[Bug tree-optimization/46651] ICE with graphite enabled in cairo-1.8.10

2010-11-29 Thread saellaven at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651

--- Comment #10 from saellaven at gmail dot com 2010-11-29 17:50:32 UTC ---
success after reverting the patch from http://gcc.gnu.org/PR45314

/usr/src/build-revert/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/usr/src/build-revert/./gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-4.5-20101125/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/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-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu
Thread model: posix
gcc version 4.5.2 20101125 (prerelease) (GCC)


[Bug tree-optimization/46651] [4.5 Regression] ICE with graphite enabled in cairo-1.8.10

2010-11-29 Thread saellaven at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651

saellaven at gmail dot com changed:

   What|Removed |Added

  Component|middle-end  |tree-optimization

--- Comment #16 from saellaven at gmail dot com 2010-11-29 20:14:52 UTC ---
success with snapshot + HJ Lu's patch.

$ /usr/src/build-hjpatch/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/usr/src/build-hjpatch/./gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-4.5-20101125/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/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-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu
Thread model: posix
gcc version 4.5.2 20101125 (prerelease) (GCC)