111
|
1 /* { dg-require-effective-target alloca } */
|
|
2 /* PR target/78439. */
|
|
3
|
|
4 enum demangle_component_type
|
|
5 {
|
|
6 DEMANGLE_COMPONENT_THROW_SPEC
|
|
7 };
|
|
8 struct demangle_component
|
|
9 {
|
|
10 enum demangle_component_type type;
|
|
11 struct
|
|
12 {
|
|
13 struct
|
|
14 {
|
|
15 struct demangle_component *left;
|
|
16 struct demangle_component *right;
|
|
17 };
|
|
18 };
|
|
19 };
|
|
20
|
|
21 int a, b;
|
|
22
|
|
23 struct d_info
|
|
24 {
|
|
25 struct demangle_component *comps;
|
|
26 int next_comp;
|
|
27 int num_comps;
|
|
28 struct demangle_component *subs;
|
|
29 int num_subs;
|
|
30 int is_conversion;
|
|
31 };
|
|
32
|
|
33 void
|
|
34 fn1 (int p1, struct d_info *p2)
|
|
35 {
|
|
36 p2->num_comps = 2 * p1;
|
|
37 p2->next_comp = p2->num_subs = p1;
|
|
38 p2->is_conversion = 0;
|
|
39 }
|
|
40
|
|
41 int fn3 (int *);
|
|
42 void fn4 (struct d_info *, int);
|
|
43
|
|
44 void
|
|
45 fn2 ()
|
|
46 {
|
|
47 int c;
|
|
48 struct d_info d;
|
|
49 b = 0;
|
|
50 c = fn3 (&a);
|
|
51 fn1 (c, &d);
|
|
52 struct demangle_component e[d.num_comps];
|
|
53 struct demangle_component *f[d.num_subs];
|
|
54 d.comps = e;
|
|
55 d.subs = (struct demangle_component *) f;
|
|
56 fn4 (&d, 1);
|
|
57 }
|