1 /* { dg-do run } */ 2 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ 3 4 extern void abort (void); 5 6 struct X { int *p; int *q; }; 7 foo(void)8int foo(void) 9 { 10 int i = 0, j = 1; 11 struct X x, y; 12 int **p; 13 y.p = &i; 14 x.q = &j; 15 p = __builtin_mempcpy (&x, &y, sizeof (int *)); 16 return **p; 17 } 18 main()19int main() 20 { 21 if (foo() != 1) 22 abort (); 23 return 0; 24 } 25