We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a9ba37f + 4d806e4 commit 2770756Copy full SHA for 2770756
src/goto-symex/goto_symex_state.cpp
@@ -934,10 +934,20 @@ void goto_symex_statet::rename(
934
{
935
l1_type_entry=l1_types.insert(std::make_pair(l1_identifier, type));
936
937
- if(!l1_type_entry.second)
+ if(!l1_type_entry.second) // was already in map
938
939
- type=l1_type_entry.first->second;
940
- return;
+ // do not change a complete array type to an incomplete one
+
941
+ const typet &type_prev=l1_type_entry.first->second;
942
943
+ if(type.id()!=ID_array ||
944
+ type_prev.id()!=ID_array ||
945
+ to_array_type(type).is_incomplete() ||
946
+ to_array_type(type_prev).is_complete())
947
+ {
948
+ type=l1_type_entry.first->second;
949
+ return;
950
+ }
951
}
952
953
0 commit comments