OSDN Git Service

testsuite/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / pr43560.c
1 /* PR tree-optimization/43560 */
2
3 struct S
4 {
5   int a, b;
6   char c[10];
7 };
8
9 __attribute__ ((noinline)) void
10 test (struct S *x)
11 {
12   while (x->b > 1 && x->c[x->b - 1] == '/')
13     {
14       x->b--;
15       x->c[x->b] = '\0';
16     }
17 }
18
19 const struct S s = { 0, 0, "" };
20
21 int
22 main ()
23 {
24   struct S *p;
25   asm ("" : "=r" (p) : "0" (&s));
26   test (p);
27   return 0;
28 }