1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 
4 typedef struct A { int i; double d; } A;
5 
f1(const char * c)6 void f1 (const char *c)
7 {
8   A *s = (A*) __builtin_malloc (sizeof (A));
9   double *p = &s->d;
10   s->i = 42;
11   __builtin_memcpy (p, c, sizeof (double));
12   int j = s->i;
13   if (j != 42) __builtin_abort();
14 }
15 
16 /* { dg-final { scan-tree-dump-not "abort" "optimized" } } */
17 
18