A gcc build from this morning:

$ /home/anton/toolchain/install/bin/gcc -v
Using built-in specs.
Target: powerpc-linux
Configured with: /home/anton/toolchain/gcc/gcc/configure --build=powerpc-linux
--host=powerpc-linux --target=powerpc-linux --enable-targets=powerpc64-linux
--enable-languages=c,c++,fortran --prefix=/home/anton/toolchain/install
Thread model: posix
gcc version 4.2.0 20060219 (experimental)

Using the following test case:

char buf[128];

unsigned int foo()
{
        unsigned int i, offset = 0;
        for (i = 0; i < 128; i++)
                offset += buf[i];
        return offset;
}

Dies when compiled with autovectorization:

$ /home/anton/toolchain/install/bin/gcc -c -O3 -fno-tree-dce -ftree-vectorize
-ftree-vectorizer-verbose=5 -maltivec foo.c

foo.c:6: note: LOOP VECTORIZED.
foo.c:6: note: vectorized 1 loops in function.
foo.c: In function 'foo':
foo.c:4: internal compiler error: in expand_widen_pattern_expr, at optabs.c:385
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

It works if offset is a char.


-- 
           Summary: Autovectorization of char  -> int loop gets ICE
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anton at samba dot org
GCC target triplet: powerpc64-linux


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

Reply via email to