aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr51949.c
blob: e23bd7b4c1353d214d6e73fe654cdbbaf893f574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */

typedef long unsigned int size_t;
extern __attribute__ ((malloc)) void *mem_alloc(size_t);
void *mem_alloc(size_t amount)
{
  void *q = __builtin_malloc (amount);
  if (!q) {
      __builtin_printf("malloc");
      __builtin_exit(255);
  }
}
void mem_realloc()
{
  mem_alloc(1);
}
void put_env_var()
{
  mem_alloc(1);
}