PR c++/67273
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr39839.c
blob3d353244c765cba91613aa3e70ae1ecb6f6d45c6
1 /* { dg-require-effective-target fpic } */
2 /* { dg-options "-Os -fpic" } */
3 /* { dg-final { scan-assembler-not "str\[\\t \]*r.,\[\\t \]*.sp," } } */
5 struct S
7 int count;
8 char *addr;
9 };
11 void func(const char*, const char*, int, const char*);
13 /* This function should not need to spill to the stack. */
14 void test(struct S *p)
16 int off = p->count;
17 while (p->count >= 0)
19 const char *s = "xyz";
20 if (*p->addr) s = "pqr";
21 func("abcde", p->addr + off, off, s);
22 p->count--;