1 // PR c++/35652
2 // { dg-options "-O -Wall" }
3 
4 #include <string>
test()5 int test() {
6   // blank line padding, could also be code...
7   //
8   //
9   //
10   //
11   //
12   //
13   //
14   //
15   //
16   std::string s = "";
17   s += 'x' + "y";	      // { dg-warning "bounds of constant string" }
18 
19   return 0;
20 }
21 
22 // With -std=c++17 we get another warning deep under operator+=.
23 // { dg-prune-output __builtin_memcpy }
24