int main (void) { volatile int i; struct T *t = (struct T *) __builtin_calloc (sizeof (struct T) + sizeof (int), 1); i = t->a[1]; struct U *u = (struct U *) __builtin_calloc (sizeof (struct U) + sizeof (int), 1); i = u->a[1]; return 0; }
void test (void *p, unsigned n) { TEST (__builtin_aligned_alloc (n, 8)); TEST (__builtin_alloca (n)); TEST (__builtin_calloc (4, n)); TEST (__builtin_malloc (n)); TEST (__builtin_realloc (p, n + 1)); }
__attribute__((noinline, noclone)) void f1 (int i) { volatile int j; struct S s; s.p = (char *) __builtin_calloc (N, 1); j = s.p[i]; j = *(s.p + i); __builtin_free (s.p); }
int main () { volatile double d = 0.0; double *p = __builtin_calloc (1, sizeof (double)); d += 1.0; *p += 2.0; __builtin_free (p); return 0; }
void *test2(size_t n, size_t s) { return __builtin_calloc(n,s); }