This commit was manufactured by cvs2svn to create branch
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-12.c
blob22ba8ce3d314d4a27a70baba86fc511386ad4cc9
1 /* Copyright (C) 2003 Free Software Foundation.
3 Verify that all the malloc-like __builtin_ allocation functions are
4 recognized by the compiler.
6 Written by Roger Sayle, 12th April 2003. */
8 /* { dg-do compile } */
9 /* { dg-final { scan-assembler-not "__builtin_" } } */
11 typedef __SIZE_TYPE__ size_t;
13 void *test1(size_t n)
15 return __builtin_malloc(n);
18 void *test2(size_t n, size_t s)
20 return __builtin_calloc(n,s);
23 char *test3(const char *ptr)
25 return __builtin_strdup(ptr);