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

            Bug ID: 65063
           Summary: gcc.dg/vect/vect-double-reduc-6.c FAILs with -O3
                    -fno-tree-loop-ivcanon -fno-tree-vectorize
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 34754
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34754&action=edit
reduced testcase

Output (on reduced testcase):
$ gcc -Wall -W testcase.c -O3 -fno-tree-loop-ivcanon -fno-tree-vectorize
$ ./a.out 
Aborted

The assembly code shows:
...
    mov    DWORD PTR out[rip], 0    # out,
    mov    DWORD PTR out[rip+4], 16    # out,
    mov    DWORD PTR out[rip+8], 256    # out,
    mov    DWORD PTR out[rip+12], 16384    # out,
    call    abort    #

out[] = {0, 16, 256, 16384}
but should be
out[] = {0, 16, 256, 4096}

(gdb) p in
$1 = {{0, 0, 0, 0}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {2, 2, 2, 2}, {2,
2, 2, 2}, {2, 2, 2, 2}, {3, 3, 3, 3}}
(gdb) p out
$2 = {0, 16, 256, 16384}

in[] looks fine, also in the assembly

The first dump where "16384" appears is 191r.cse1. This might be the same as
PR63593.

Tested revisions:
r220676 - fail

Reply via email to