[Bug tree-optimization/56157] New: ICE with -ftree-vectorize in in compute_live_loop_exits (4.8 trunk)

jana at saout dot de gcc-bugzilla@gcc.gnu.org
Wed Jan 30 21:43:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56157

             Bug #: 56157
           Summary: ICE with -ftree-vectorize in in
                    compute_live_loop_exits (4.8 trunk)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jana@saout.de


When compiling mesa-9.0.1 using the latest gcc trunk from SVN, I noticed the
following ICE (seems to have been introduced at least a week ago, worked with
some earlier 4.8.0 versions I haven't pinpointed).

LANG=C gcc -O2 -ftree-vectorize -c lala.c
lala.c: In function ‘fn’:
lala.c:14:6: internal compiler error: in compute_live_loop_exits, at
tree-ssa-loop-manip.c:219
 void fn(unsigned char *dst_row, unsigned dst_stride,
      ^

lala.c:14:6: internal compiler error: Aborted
gcc: internal compiler error: Aborted (program cc1)

(on x86_64, reproducable with and without -m32)

With the following reduced testcase:

------------------------------
#include <string.h>
#include <stdint.h>

union Pixel {
   uint64_t value;
   struct {
      unsigned short r;
      unsigned short g;
      unsigned short b;
      unsigned short a;
   } chan;
};

void fn(unsigned char *dst_row, unsigned dst_stride,
        const unsigned char *src_row, unsigned src_stride,
        unsigned width, unsigned height)
{
   unsigned x, y;
   for(y = 0; y < height; y += 1) {
      const unsigned char *src = src_row;
      unsigned char *dst = dst_row;
      for(x = 0; x < width; x += 1) {
         union Pixel pixel;
         pixel.chan.r = (unsigned short)(((unsigned)src[0]) * 0xffff / 0xff);
         pixel.chan.g = (unsigned short)(((unsigned)src[1]) * 0xffff / 0xff);
         pixel.chan.b = (unsigned short)(((unsigned)src[2]) * 0xffff / 0xff);
         pixel.chan.a = (unsigned short)(((unsigned)src[3]) * 0xffff / 0xff);
         memcpy(dst, &pixel, sizeof pixel);
         src += 4;
         dst += 8;
      }
      dst_row += dst_stride;
      src_row += src_stride/sizeof(*src_row);
   }
}
------------------------------

gcc version:

Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0-beta20130130/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0-beta20130130/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.8.0_beta20130130/work/gcc-4.8-20130130/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0-beta20130130
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0-beta20130130/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-beta20130130
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-beta20130130/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-beta20130130/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0-beta20130130/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --with-cloog --disable-isl-version-check
--disable-cloog-version-check --with-cloog-include=/usr/include/cloog
--enable-cloog-backend=isl --enable-lto --enable-nls --without-included-gettext
--with-system-zlib --enable-obsolete --disable-werror --enable-secureplt
--enable-multilib --with-multilib-list=m32,m64
--with-build-config=bootstrap-lto --enable-libmudflap --disable-libssp
--enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-beta20130130/python
--enable-checking=release --enable-java-awt=gtk --enable-libstdcxx-time
--enable-languages=c,c++,java,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_beta20130130'
Thread model: posix
gcc version 4.8.0-beta20130130 20130130 (experimental) (Gentoo
4.8.0_beta20130130) 

(it says Gentoo because I used the build environment, but it's essentially a
vanilla gcc build which I am regularly throwing the SVN version at and building
the system with)



More information about the Gcc-bugs mailing list