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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
           Assignee|unassigned at gcc dot gnu.org      |msebor at gcc dot 
gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #12 from Martin Sebor <msebor at gcc dot gnu.org> ---
With the patch under test GCC issues the following for the test case in comment
#0 (the test case in comment #7 has been diagnosed on trunk since r11-2370):

$ gcc -O2 -S -Wall pr93848.c
pr93848.c: In function ‘foo’:
pr93848.c:8:3: warning: ‘i’ is used uninitialized [-Wuninitialized]
    8 |   foo_aux (p[1]);
      |   ^~~~~~~~~~~~~~
pr93848.c:6:7: note: ‘i’ declared here
    6 |   int i;
      |       ^
pr93848.c:8:3: warning: array subscript 1 is outside array bounds of ‘int[1]’
[-Warray-bounds]
    8 |   foo_aux (p[1]);
      |   ^~~~~~~~~~~~~~
pr93848.c:6:7: note: while referencing ‘i’
    6 |   int i;
      |       ^
pr93848.c: In function ‘bar’:
pr93848.c:17:3: warning: subscript 4 in argument 1 to ‘bar_aux’ is just past
the end of ‘int[4]’ [-Warray-bounds]
   17 |   bar_aux (p[1]);
      |   ^~~~~~~~~~~~~~
pr93848.c:15:7: note: at offset 16 into source object ‘i’ of size 16
   15 |   int i[4];
      |       ^

Reply via email to