OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [pr39839.c] - Blame information for rev 714

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-require-effective-target fpic } */
2
/* { dg-options "-Os -fpic" }  */
3
/* { dg-final { scan-assembler-not "str\[\\t \]*r.,\[\\t \]*.sp," } } */
4
 
5
struct S
6
{
7
  int count;
8
  char *addr;
9
};
10
 
11
void func(const char*, const char*, int, const char*);
12
 
13
/* This function should not need to spill to the stack. */
14
void test(struct S *p)
15
{
16
  int off = p->count;
17
  while (p->count >= 0)
18
    {
19
      const char *s = "xyz";
20
      if (*p->addr) s = "pqr";
21
      func("abcde", p->addr + off, off, s);
22
      p->count--;
23
    }
24
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.