OSDN Git Service

PR target/40971
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr40971.c
1 /* PR target/40971 */
2 /* { dg-do compile } */
3 /* { dg-options "-O -fstack-protector -fno-strict-aliasing" } */
4 /* { dg-require-effective-target fstack_protector } */
5
6 extern void bar (char *);
7
8 void
9 foo (int f, long a)
10 {
11   {
12     char d[32768];
13     bar (d);
14   }
15   double b = f;
16   while (a)
17     {
18       char c[sizeof (double)];
19       __builtin_memcpy (c, &b, sizeof (c));
20       if (*(double *) c != 2.0)
21         break;
22     }
23 }