Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.dg / array-init-1.c
blob57669183dbb064ee74b1364ee486b69908fca08c
1 /* Test that both arrays are initialized by store_by_pieces. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-options "-O2 -mtune=i686" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
6 struct A { char c[10]; };
7 extern void baz (struct A *);
9 void
10 foo (void)
12 struct A a = { "abcdefghi" };
13 baz (&a);
16 void
17 bar (void)
19 struct A a;
20 __builtin_strcpy (&a.c[0], "abcdefghi");
21 baz (&a);
24 /* { dg-final { scan-assembler-not "abcdefghi" { target i?86-*-* x86_64-*-* ia64-*-* } } } */
25 /* { dg-final { scan-assembler-times "7523094288207667809\|6867666564636261\|1684234849\|64636261" 2 { target i?86-*-* x86_64-*-* ia64-*-* } } } */