19de595e8ed815b43d62a0cd42c8b68c7f8993f5
[platform/upstream/gcc.git] / gcc / testsuite / gcc.dg / struct / w_ratio_cold_str.c
1 #include <stdlib.h>
2 typedef struct
3 {
4   int a;
5   int b;
6 }str_t1;
7
8 typedef struct
9 {
10   float a;
11   float b;
12 }str_t2;
13
14 #define N1 1000
15 #define N2 100
16 str_t1 A1[N1];
17 str_t2 A2[N2];
18
19 int
20 main ()
21 {
22   int i;
23
24   for (i = 0; i < N1; i++)
25     A1[i].a = 0;
26
27   for (i = 0; i < N2; i++)
28     A2[i].a = 0;
29
30   for (i = 0; i < N1; i++)
31     if (A1[i].a != 0) 
32       abort ();
33
34   for (i = 0; i < N2; i++)
35     if (A2[i].a != 0) 
36       abort ();
37
38   return 0;
39 }
40
41 /*--------------------------------------------------------------------------*/
42 /* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
43 /* { dg-final-use { cleanup-ipa-dump "*" } } */