2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / struct / w_prof_global_var.c
blob8f1ae752fd3944d587d1f67d443d6ecc63f2da9f
1 #include <stdlib.h>
2 typedef struct
4 int a;
5 float b;
6 }str_t;
8 #define N 1000
10 str_t *p;
12 int
13 main ()
15 int i, sum;
17 p = malloc (N * sizeof (str_t));
19 for (i = 0; i < N; i++)
20 p[i].b = i;
22 for (i = 0; i < N; i++)
23 p[i].a = p[i].b + 1;
25 for (i = 0; i < N; i++)
26 if (p[i].a != p[i].b + 1)
27 abort ();
29 return 0;
32 /*--------------------------------------------------------------------------*/
33 /* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
34 /* { dg-final-use { cleanup-ipa-dump "*" } } */