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 
nowarn_range_ptr_var_1(int i)14 void nowarn_range_ptr_var_1 (int i)
15 {
16   __builtin_sprintf (d4, "%s", ap[i]);
17 }
18 
nowarn_range_ptr_var_2(int i,int j)19 void nowarn_range_ptr_var_2 (int i, int j)
20 {
21   __builtin_sprintf (d7, "%s%s", ap[i], ap[j]);
22 }
23