wo_prof_escape_substr_value.c: Limit allocation based on STACK_SIZE.
[gcc.git] / gcc / testsuite / gcc.dg / struct / wo_prof_escape_return.c
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 } */
4
5 #include <stdlib.h>
6
7 struct A {
8 int d;
9 };
10
11 struct A a;
12
13 struct A foo ()
14 {
15 a.d = 5;
16 return a;
17 }
18
19 int
20 main ()
21 {
22 a.d = 0;
23 foo ();
24
25 if (a.d != 5)
26 abort ();
27
28 return 0;
29 }
30
31 /*--------------------------------------------------------------------------*/
32 /* { dg-final { scan-ipa-dump "is return type of function...Excluded" "ipa_struct_reorg" } } */
33 /* { dg-final { cleanup-ipa-dump "*" } } */