2015-06-03 Hale Wang <hale.wang@arm.com>
[official-gcc.git] / embedded-4_9-branch / gcc / testsuite / gcc.target / arm / pr64818.c
blobbddd8462c698adb15c50913b6ceffadc6f64a876
1 /* { dg-do compile } */
2 /* { dg-options "-O1" } */
4 char temp[16];
5 extern int foo1 (void);
7 void foo (void)
9 int i;
10 int len;
12 while (1)
14 len = foo1 ();
15 register int a asm ("r0") = 5;
16 register char *b asm ("r1") = temp;
17 register int c asm ("r2") = len;
18 asm volatile ("mov %[r0], %[r0]\n mov %[r1], %[r1]\n mov %[r2], %[r2]\n"
19 : "+m"(*b)
20 : [r0]"r"(a), [r1]"r"(b), [r2]"r"(c));
22 for (i = 0; i < len; i++)
24 if (temp[i] == 10)
25 return;
30 /* { dg-final { scan-assembler "\[\\t \]+mov\ r1,\ r1" } } */