Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / array-init-1.c
blob8b866cca3f3e8c73c7b35f7fc470a1197c05babd
1 /* Test that both arrays are initialized by store_by_pieces. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 struct A { char c[10]; };
6 extern void baz (struct A *);
8 void
9 foo (void)
11 struct A a = { "abcdefghi" };
12 baz (&a);
15 void
16 bar (void)
18 struct A a;
19 __builtin_strcpy (&a.c[0], "abcdefghi");
20 baz (&a);
23 /* { dg-final { scan-assembler-not "abcdefghi" { target i?86-*-* x86_64-*-* ia64-*-* } } } */
24 /* { dg-final { scan-assembler-times "7523094288207667809\|6867666564636261\|1684234849\|64636261" 2 { target i?86-*-* x86_64-*-* ia64-*-* } } } */