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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr24615.c] - Blame information for rev 414

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

Line No. Rev Author Line
1 298 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.