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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20120207-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
/* PR middle-end/51994 */
2
/* Testcase by Uros Bizjak <ubizjak@gmail.com> */
3
 
4
extern char *strcpy (char *, const char *);
5
extern void abort (void);
6
 
7
char __attribute__((noinline))
8
test (int a)
9
{
10
  char buf[16];
11
  char *output = buf;
12
 
13
  strcpy (&buf[0], "0123456789");
14
 
15
  output += a;
16
  output -= 1;
17
 
18
  return output[0];
19
}
20
 
21
int main ()
22
{
23
  if (test (2) != '1')
24
    abort ();
25
 
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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