(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
Warray-bounds-70.c
       1  /* PR middle-end/97556 - ICE on excessively large index into a multidimensional
       2     array
       3     { dg-do compile }
       4     { dg-options "-O2 -Wall" } */
       5  
       6  #define SIZE_MAX __SIZE_MAX__
       7  
       8  typedef __SIZE_TYPE__ size_t;
       9  
      10  char a[1][3];
      11  
      12  void f (int c)
      13  {
      14    size_t i = c ? SIZE_MAX / 2 : SIZE_MAX;
      15    a[i][0] = 0;                          // { dg-warning "\\\[-Warray-bounds" }
      16  }
      17  
      18  // { dg-prune-output "\\\[-Wstringop-overflow=" }