Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/pr78439.c

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