@@ -96,18 +96,17 @@ void symbol_factoryt::gen_nondet_init(
96
96
const std::size_t depth,
97
97
recursion_sett recursion_set)
98
98
{
99
- const typet &type=ns. follow ( expr.type () );
99
+ const typet &type = expr.type ();
100
100
101
101
if (type.id ()==ID_pointer)
102
102
{
103
103
// dereferenced type
104
104
const pointer_typet &pointer_type=to_pointer_type (type);
105
- const typet &subtype=ns. follow ( pointer_type.subtype () );
105
+ const typet &subtype = pointer_type.subtype ();
106
106
107
- if (subtype.id () == ID_struct )
107
+ if (subtype.id () == ID_struct_tag )
108
108
{
109
- const struct_typet &struct_type = to_struct_type (subtype);
110
- const irep_idt struct_tag = struct_type.get_tag ();
109
+ const irep_idt struct_tag = to_struct_tag_type (subtype).get_identifier ();
111
110
112
111
if (
113
112
recursion_set.find (struct_tag) != recursion_set.end () &&
@@ -153,14 +152,16 @@ void symbol_factoryt::gen_nondet_init(
153
152
assignments.add (std::move (null_check));
154
153
}
155
154
}
156
- else if (type.id () == ID_struct )
155
+ else if (type.id () == ID_struct_tag )
157
156
{
158
- const struct_typet &struct_type = to_struct_type (type);
157
+ const auto &struct_tag_type = to_struct_tag_type (type);
159
158
160
- const irep_idt struct_tag = struct_type. get_tag ();
159
+ const irep_idt struct_tag = struct_tag_type. get_identifier ();
161
160
162
161
recursion_set.insert (struct_tag);
163
162
163
+ const auto &struct_type = to_struct_type (ns.follow_tag (struct_tag_type));
164
+
164
165
for (const auto &component : struct_type.components ())
165
166
{
166
167
const typet &component_type = component.type ();
0 commit comments