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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=8268

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
What's interesting is, if you try the testcase from r5-6382-gde1b5c17fd1418,
it's fine.

```
$ gcc gcc/testsuite/gcc.dg/Warray-bounds-11.c -O2 -c -Warray-bounds=2
gcc/testsuite/gcc.dg/Warray-bounds-11.c: In function ‘foo’:
gcc/testsuite/gcc.dg/Warray-bounds-11.c:60:13: warning: array subscript 4 is
above array bounds of ‘int[3]’ [-Warray-bounds=]
   60 |         (*a)[4] = 1;    /* { dg-warning "subscript 4 is above array
bound" } */
      |         ~~~~^~~
gcc/testsuite/gcc.dg/Warray-bounds-11.c:58:16: note: while referencing ‘a’
   58 | void foo(int (*a)[3])
      |          ~~~~~~^~~~~
[...]
```

Reply via email to