blob: ebde340851137fb122bd93f04a4583cebd694eff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* PR optimization/11741 */
/* { dg-do compile } */
/* { dg-options "-O2 -minline-all-stringops" } */
/* { dg-options "-O2 -minline-all-stringops -march=pentium4" { target ia32 } } */
extern void *memcpy (void *, const void *, __SIZE_TYPE__);
extern __SIZE_TYPE__ strlen (const char *);
void
foo (char *p)
{
for (;;)
{
memcpy (p, p + 1, strlen (p));
p++;
}
}
|