view gcc/testsuite/gcc.dg/torture/pr51949.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { 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);
}