re PR middle-end/42834 (memcpy folding overeager)
[gcc.git] / gcc / testsuite / gcc.dg / struct / wo_prof_global_array.c
1 /* { dg-do compile } */
2 /* { dg-do run } */
3
4 #include <stdlib.h>
5 typedef struct
6 {
7 int a;
8 float b;
9 }str_t;
10
11 #define N 1000
12 str_t A[N];
13
14 int
15 main ()
16 {
17 int i;
18
19 for (i = 0; i < N; i++)
20 {
21 A[i].a = 0;
22 }
23
24 for (i = 0; i < N; i++)
25 if (A[i].a != 0)
26 abort ();
27
28 return 0;
29 }
30
31 /*--------------------------------------------------------------------------*/
32 /* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail *-*-* } } } */
33 /* { dg-final { cleanup-ipa-dump "*" } } */