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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr24615.c] - Rev 867

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

 
/* { dg-do compile { target fpic } } */
/* { dg-options "-Os -fPIC" } */
 
void *memset (void *, int, __SIZE_TYPE__);
void *memcpy (void *, const void *, __SIZE_TYPE__);
 
char *alloc (int);
 
char *
test (int type, int size, char *data, int len)
{
  char *block = alloc (size);
  char *bp = block;
 
  *bp++ = type;
  switch (type)
    {
    case 0:
    case 1:
      memset (bp, type == 0 ? 0x00 : 0xff, size);
      memcpy (bp, data, len);
    }
 
  return block;
}
 
 

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

powered by: WebSVN 2.1.0

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