1 /* PR tree-optimization/89688 - -Wstringop-overflow confused by const 2D
4 { dg-options "-Wall -fdump-tree-gimple -fdump-tree-optimized" } */
6 extern "C" __SIZE_TYPE__ strlen (const char*);
8 const char a2[2] = { '1' };
16 const char a2_2[2][3] = { { '1' }, { '1', '2' } };
20 if (strlen (a2_2[0]) != 1) // { dg-bogus "-Wstringop-overflow" }
23 if (strlen (a2_2[1]) != 2) // { dg-bogus "-Wstringop-overflow" }
28 /* { dg-final { scan-tree-dump-not "abort" "optimized" } }
29 { dg-final { scan-tree-dump-not "strlen" "gimple" } } */