Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.dg / struct / wo_prof_escape_arg_to_local.c
blobb120a799cd6fb9ee91a369a8c854422159b2670a
1 /* { dg-options "-O3 -fno-inline -fipa-type-escape -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
2 /* { dg-do compile } */
3 /* { dg-do run } */
5 #include <stdlib.h>
6 struct str
8 int a;
9 float b;
12 #define N 1000
14 int
15 foo (struct str * p_str)
17 static int sum = 0;
19 sum = sum + p_str->a;
20 return sum;
23 int
24 main ()
26 int i, sum;
27 struct str * p = malloc (N * sizeof (struct str));
29 for (i = 0; i < N; i++)
30 sum = foo (p+i);
32 return 0;
35 /*--------------------------------------------------------------------------*/
36 /* { dg-final { scan-ipa-dump "is passed to local function...Excluded." "ipa_struct_reorg" } } */
37 /* { dg-final { cleanup-ipa-dump "*" } } */