2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / struct / wo_prof_local_var.c
blob65b3197831231d00685a6d0a52e7b8d7bb152487
1 /* { dg-do compile } */
2 /* { dg-do run } */
4 #include <stdlib.h>
5 typedef struct
7 int a;
8 float b;
9 }str_t;
11 #define N 1000
13 int
14 main ()
16 int i, sum;
18 str_t * p = malloc (N * sizeof (str_t));
20 for (i = 0; i < N; i++)
21 p[i].b = i;
23 for (i = 0; i < N; i++)
24 p[i].a = p[i].b + 1;
26 for (i = 0; i < N; i++)
27 if (p[i].a != p[i].b + 1)
28 abort ();
30 return 0;
33 /*--------------------------------------------------------------------------*/
34 /* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
35 /* { dg-final { cleanup-ipa-dump "*" } } */