public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/60505] New: Warning caused by GCC vectorizer.
@ 2014-03-11 22:01 congh at google dot com
  2014-03-11 22:27 ` [Bug tree-optimization/60505] " congh at google dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: congh at google dot com @ 2014-03-11 22:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60505
           Summary: Warning caused by GCC vectorizer.
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: congh at google dot com

The compilation on the code below fails with options "-Wall  -Werror -O2
-ftree-loop-vectorize". The reason is that the epilogue generated by the
vectorizer tries to access the memory outside of ovec[16] and the the vrp pass
emits the warning "array subscript is above array bounds" for the access to
ovec[i]. The vectorizer should not generate the epilogue for this loop.



void foo(char *in, char *out, int num)
{
 int i;
 unsigned char ovec[16] = {0};

 for(i=0; i < num ; ++i)
   out[i] = (ovec[i] = in[i]);
 out[num] = ovec[num/2];
}


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-06-23  8:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 22:01 [Bug tree-optimization/60505] New: Warning caused by GCC vectorizer congh at google dot com
2014-03-11 22:27 ` [Bug tree-optimization/60505] " congh at google dot com
2014-03-12  9:21 ` rguenth at gcc dot gnu.org
2014-03-12 10:03 ` jakub at gcc dot gnu.org
2014-03-31  8:01 ` [Bug tree-optimization/60505] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-03-31  9:43 ` rguenth at gcc dot gnu.org
2014-04-03 23:06 ` congh at gcc dot gnu.org
2014-04-09 12:36 ` [Bug tree-optimization/60505] [4.8 " jakub at gcc dot gnu.org
2014-05-22  9:02 ` rguenth at gcc dot gnu.org
2014-12-19 13:30 ` jakub at gcc dot gnu.org
2015-06-23  8:48 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).