PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr66817.c
blob7ec18b74d1c01a0c5259746ff64da524622a1d65
1 /* { dg-do compile { target ia32 } } */
2 /* { dg-options "-O2 -mno-sse -mno-mmx -miamcu" } */
4 extern void abort (void);
5 int
6 main (int argc, char **argv)
8 int size = 10;
9 typedef struct
11 char val[size];
13 block;
14 block a, b;
15 block __attribute__((noinline))
16 retframe_block ()
18 return *(block *) &b;
20 b.val[0] = 1;
21 b.val[9] = 2;
22 a=retframe_block ();
23 if (a.val[0] != 1
24 || a.val[9] != 2)
25 abort ();
26 return 0;