1/* Ensure that we don't use 'repnz scasb' in the presence of register globals.  */
2/* { dg-do compile } */
3/* { dg-options "-O1 -w" } */
4
5extern __SIZE_TYPE__ strlen (const char *);
6extern void *malloc (__SIZE_TYPE__);
7
8register int regvar asm("%edi");
9
10char *
11do_copy (char *str)
12{
13  return malloc (strlen (str) + 1);
14}
15
16/* { dg-final { scan-assembler-not "repnz scasb" } } */
17