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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr24615.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
 
2
/* { dg-do compile { target fpic } } */
3
/* { dg-options "-Os -fPIC" } */
4
 
5
void *memset (void *, int, __SIZE_TYPE__);
6
void *memcpy (void *, const void *, __SIZE_TYPE__);
7
 
8
char *alloc (int);
9
 
10
char *
11
test (int type, int size, char *data, int len)
12
{
13
  char *block = alloc (size);
14
  char *bp = block;
15
 
16
  *bp++ = type;
17
  switch (type)
18
    {
19
    case 0:
20
    case 1:
21
      memset (bp, type == 0 ? 0x00 : 0xff, size);
22
      memcpy (bp, data, len);
23
    }
24
 
25
  return block;
26
}
27
 

powered by: WebSVN 2.1.0

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