(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
strlenopt-42.c
       1  /* PR tree-optimization/83781 - Bootstrap failed on x86 with --with-arch=corei7
       2     --with-cpu=corei7
       3     Verify that the upper bound of the size of an array of pointers
       4     to strings isn't considered to be the upper bound of the lengths
       5     of the pointed-to strings.
       6     { dg-do compile }
       7     { dg-options "-O2 -Wall" } */
       8  
       9  const char* const ap[32] = { "1", "12", "123" };
      10  
      11  char d4[4];
      12  char d7[7];
      13  
      14  void nowarn_range_ptr_var_1 (int i)
      15  {
      16    __builtin_sprintf (d4, "%s", ap[i]);
      17  }
      18  
      19  void nowarn_range_ptr_var_2 (int i, int j)
      20  {
      21    __builtin_sprintf (d7, "%s%s", ap[i], ap[j]);
      22  }