blob: 311c9a042e04438366eba3c47daa5707931f55d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/* { dg-do compile { target { ! x32 } } } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */
/* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */
#include "string.h"
size_t test (char *str1, char *str2)
{
size_t len = strlen (str2);
memcpy (str1, str2, len + 1);
return len + strlen (str1);
}
|