Skip to content

Commit 63c6557

Browse files
committed
remove_vector also applies to code_typet
This omission became apparent when trying to run the upcoming SIMD1 test (added in a later commit, further bug fixes are necessary).
1 parent b89c32c commit 63c6557

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/goto-programs/remove_vector.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ static bool have_to_remove_vector(const typet &type)
6464
if(have_to_remove_vector(c.type()))
6565
return true;
6666
}
67+
else if(type.id() == ID_code)
68+
{
69+
const code_typet &code_type = to_code_type(type);
70+
71+
if(have_to_remove_vector(code_type.return_type()))
72+
return true;
73+
for(auto &parameter : code_type.parameters())
74+
{
75+
if(have_to_remove_vector(parameter.type()))
76+
return true;
77+
}
78+
}
6779
else if(type.id()==ID_pointer ||
6880
type.id()==ID_complex ||
6981
type.id()==ID_array)
@@ -256,6 +268,14 @@ static void remove_vector(typet &type)
256268
remove_vector(it->type());
257269
}
258270
}
271+
else if(type.id() == ID_code)
272+
{
273+
code_typet &code_type = to_code_type(type);
274+
275+
remove_vector(code_type.return_type());
276+
for(auto &parameter : code_type.parameters())
277+
remove_vector(parameter.type());
278+
}
259279
else if(type.id()==ID_pointer ||
260280
type.id()==ID_complex ||
261281
type.id()==ID_array)

0 commit comments

Comments
 (0)