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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [builtins-12.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Copyright (C) 2003  Free Software Foundation.
2
 
3
   Verify that all the malloc-like __builtin_ allocation functions are
4
   recognized by the compiler.
5
 
6
   Written by Roger Sayle, 12th April 2003.  */
7
 
8
/* { dg-do compile } */
9
/* { dg-options "-ansi" } */
10
/* { dg-final { scan-assembler-not "__builtin_" } } */
11
 
12
typedef __SIZE_TYPE__ size_t;
13
 
14
void *test1(size_t n)
15
{
16
  return __builtin_malloc(n);
17
}
18
 
19
void *test2(size_t n, size_t s)
20
{
21
  return __builtin_calloc(n,s);
22
}
23
 
24
char *test3(const char *ptr)
25
{
26
  return __builtin_strdup(ptr);
27
}
28
 

powered by: WebSVN 2.1.0

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