]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/struct/w_prof_local_array.c
re PR middle-end/42834 (memcpy folding overeager)
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / struct / w_prof_local_array.c
CommitLineData
65e79ca2
OG
1#include <stdlib.h>
2typedef struct
3{
4 int a;
5 float b;
6}str_t;
7
564475d7
AH
8#ifdef STACK_SIZE
9#if STACK_SIZE > 8000
65e79ca2 10#define N 1000
564475d7
AH
11#else
12#define N (STACK_SIZE/8)
13#endif
14#else
15#define N 1000
16#endif
65e79ca2
OG
17
18int
19main ()
20{
21 int i;
22 str_t A[N];
23
24 for (i = 0; i < N; i++)
25 {
26 A[i].a = 0;
27 }
28
29 for (i = 0; i < N; i++)
30 if (A[i].a != 0)
31 abort ();
32
33 return 0;
34}
35
36/*--------------------------------------------------------------------------*/
70f34814 37/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail *-*-* } } } */
65e79ca2 38/* { dg-final-use { cleanup-ipa-dump "*" } } */