public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/59124] New: [4.8 Regression] Wrong warnings "array subscript is above array bounds"
@ 2013-11-14  0:44 d.g.gorbachev at gmail dot com
  2013-11-14  9:51 ` [Bug tree-optimization/59124] [4.8/4.9 " rguenth at gcc dot gnu.org
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2013-11-14  0:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59124
           Summary: [4.8 Regression] Wrong warnings "array subscript is
                    above array bounds"
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: d.g.gorbachev at gmail dot com

$ gcc -S -Wall -O3 1.c
1.c: In function 'foo':
1.c:12:23: warning: array subscript is above array bounds [-Warray-bounds]
       bar[j - 1] = baz[j - 1];
                       ^
1.c:12:23: warning: array subscript is above array bounds [-Warray-bounds]

=============== 8< ===============
unsigned baz[6];

void foo(unsigned *bar, unsigned n)
{
  unsigned i, j;

  if (n > 6)
    n = 6;

  for (i = 1; i < n; i++)
    for (j = i - 1; j > 0; j--)
      bar[j - 1] = baz[j - 1];
}
=============== >8 ===============

GCC 4.8.0 20120902 /rev. 190863/ - works,
GCC 4.8.0 20121111 /rev. 193417/ - fails.


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

end of thread, other threads:[~2021-01-05  9:14 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-14  0:44 [Bug tree-optimization/59124] New: [4.8 Regression] Wrong warnings "array subscript is above array bounds" d.g.gorbachev at gmail dot com
2013-11-14  9:51 ` [Bug tree-optimization/59124] [4.8/4.9 " rguenth at gcc dot gnu.org
2013-11-14 17:56 ` d.g.gorbachev at gmail dot com
2013-11-21 14:39 ` rguenth at gcc dot gnu.org
2014-03-12 14:33 ` jakub at gcc dot gnu.org
2014-05-22  9:03 ` [Bug tree-optimization/59124] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:25 ` [Bug tree-optimization/59124] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-01-27  9:50 ` rguenth at gcc dot gnu.org
2015-01-27 10:59 ` rguenth at gcc dot gnu.org
2015-02-18  2:22 ` solar-gcc at openwall dot com
2015-02-18  4:37 ` solar-gcc at openwall dot com
2015-02-19 14:14 ` rguenth at gcc dot gnu.org
2015-02-24 13:09 ` rguenth at gcc dot gnu.org
2015-04-16 12:14 ` [Bug tree-optimization/59124] [4.8/4.9/5/6 " georgmueller at gmx dot net
2015-05-26 15:34 ` georgmueller at gmx dot net
2015-06-01 23:49 ` daniel at imperfectcode dot com
2015-06-23  8:16 ` rguenth at gcc dot gnu.org
2015-06-26 19:53 ` [Bug tree-optimization/59124] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:26 ` jakub at gcc dot gnu.org
2015-09-10 21:04 ` pangbw at gmail dot com
2015-09-11  0:29 ` manu at gcc dot gnu.org
2015-09-11 16:13 ` pangbw at gmail dot com
2015-09-11 16:51 ` manu at gcc dot gnu.org
2015-09-17 18:18 ` pangbw at gmail dot com
2015-09-17 19:02 ` pangbw at gmail dot com
2015-09-18 17:59 ` pangbw at gmail dot com
2015-09-18 18:32 ` manu at gcc dot gnu.org
2015-09-18 19:17 ` manu at gcc dot gnu.org
2015-09-18 21:11 ` pangbw at gmail dot com
2015-09-22 20:06 ` pangbw at gmail dot com
2021-01-05  9:14 ` [Bug tree-optimization/59124] [6 " szotsaki at gmail dot com

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).