OSDN Git Service

PR middle-end/30789
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / torture / 20090618-1.c
1 /* { dg-do run } */
2 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
3
4 extern void abort (void);
5
6 struct X { int *p; int *q; };
7
8 int 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
19 int main()
20 {
21   if (foo() != 1)
22     abort ();
23   return 0;
24 }