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

           Summary: gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c FAILs
                    with random flags
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz
                CC: i...@gcc.gnu.org
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


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

The testcase added in r174265, fixing PR49038, seems to be causing random
failures during testing:

$ gcc -mieee-fp -flto -ftree-vectorize -O -lm -fno-omit-frame-pointer
-funroll-loops --param=lto-min-partition=1 vect-strided-u8-i8-gap4-unknown.i
$ ./a.out
Aborted

$ gcc -flto -O2 -lm -fno-dce -fno-omit-frame-pointer
-fno-optimize-sibling-calls -ftree-vectorize -funroll-loops
--param=lto-min-partition=1 vect-strided-u8-i8-gap4-unknown.i
$ ./a.out
Aborted

$ gcc -fgcse -freorder-functions -flto -ftree-vectorize -O
-fno-omit-frame-pointer -foptimize-register-move -fno-toplevel-reorder
-funroll-loops vect-strided-u8-i8-gap4-unknown.i
$ ./a.out 
Aborted

valgrind complains even when compiled without extra flags:
$ gcc -g vect-strided-u8-i8-gap4-unknown.i -g
$ valgrind -q --track-origins=yes ./a.out
==11937== Conditional jump or move depends on uninitialised value(s)
==11937==    at 0x400AE9: main1 (vect-strided-u8-i8-gap4-unknown.c:60)
==11937==    by 0x400D91: main (vect-strided-u8-i8-gap4-unknown.c:96)
==11937==  Uninitialised value was created by a stack allocation
==11937==    at 0x400733: main1 (vect-strided-u8-i8-gap4-unknown.c:22)
==11937== 
==11937== Conditional jump or move depends on uninitialised value(s)
==11937==    at 0x400B4A: main1 (vect-strided-u8-i8-gap4-unknown.c:61)
==11937==    by 0x400D91: main (vect-strided-u8-i8-gap4-unknown.c:96)
==11937==  Uninitialised value was created by a stack allocation
==11937==    at 0x400733: main1 (vect-strided-u8-i8-gap4-unknown.c:22)
==11937== 
==11937== Conditional jump or move depends on uninitialised value(s)
==11937==    at 0x400B92: main1 (vect-strided-u8-i8-gap4-unknown.c:62)
==11937==    by 0x400D91: main (vect-strided-u8-i8-gap4-unknown.c:96)
==11937==  Uninitialised value was created by a stack allocation
==11937==    at 0x400733: main1 (vect-strided-u8-i8-gap4-unknown.c:22)
==11937== 
==11937== Conditional jump or move depends on uninitialised value(s)
==11937==    at 0x400BBB: main1 (vect-strided-u8-i8-gap4-unknown.c:63)
==11937==    by 0x400D91: main (vect-strided-u8-i8-gap4-unknown.c:96)
==11937==  Uninitialised value was created by a stack allocation
==11937==    at 0x400733: main1 (vect-strided-u8-i8-gap4-unknown.c:22)
==11937== 
==11937== Conditional jump or move depends on uninitialised value(s)
==11937==    at 0x400C03: main1 (vect-strided-u8-i8-gap4-unknown.c:64)
==11937==    by 0x400D91: main (vect-strided-u8-i8-gap4-unknown.c:96)
==11937==  Uninitialised value was created by a stack allocation
==11937==    at 0x400733: main1 (vect-strided-u8-i8-gap4-unknown.c:22)
==11937== 
==11937== Conditional jump or move depends on uninitialised value(s)
==11937==    at 0x400C4B: main1 (vect-strided-u8-i8-gap4-unknown.c:65)
==11937==    by 0x400D91: main (vect-strided-u8-i8-gap4-unknown.c:96)
==11937==  Uninitialised value was created by a stack allocation
==11937==    at 0x400733: main1 (vect-strided-u8-i8-gap4-unknown.c:22)
==11937== 
==11937== Conditional jump or move depends on uninitialised value(s)
==11937==    at 0x400C70: main1 (vect-strided-u8-i8-gap4-unknown.c:66)
==11937==    by 0x400D91: main (vect-strided-u8-i8-gap4-unknown.c:96)
==11937==  Uninitialised value was created by a stack allocation
==11937==    at 0x400733: main1 (vect-strided-u8-i8-gap4-unknown.c:22)
==11937== 
==11937== Conditional jump or move depends on uninitialised value(s)
==11937==    at 0x400CB4: main1 (vect-strided-u8-i8-gap4-unknown.c:67)
==11937==    by 0x400D91: main (vect-strided-u8-i8-gap4-unknown.c:96)
==11937==  Uninitialised value was created by a stack allocation
==11937==    at 0x400733: main1 (vect-strided-u8-i8-gap4-unknown.c:22)
==11937== 

I haven't had time to have a look at the generated assemly file, so valgrind
might be wrong. But the fact the testcase aborts in some random configurations
indicates there's something wrong. The C code however looks correct.

Reply via email to