(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
Warray-bounds-17.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -Warray-bounds" } */
       3  
       4  char *y;
       5  void foo (int sysnum)
       6  {
       7    static char *x[] = {};
       8    int nsyscalls = sizeof x / sizeof x[0];
       9    if (sysnum < 0 || sysnum >= nsyscalls)
      10      return;
      11    else
      12      y = x[sysnum]; /* { dg-bogus "above array bounds" } */
      13  }