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 
5 extern __SIZE_TYPE__ strlen (const char *);
6 extern void *malloc (__SIZE_TYPE__);
7 
8 register int regvar asm("%edi");
9 
10 char *
do_copy(char * str)11 do_copy (char *str)
12 {
13   return malloc (strlen (str) + 1);
14 }
15 
16 /* { dg-final { scan-assembler-not "repnz scasb" } } */
17