Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ansi-c/goto-conversion/goto_check_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,12 @@ void goto_check_ct::bounds_check_index(
throw "bounds check expected array or vector type, got " +
array_type.id_string();

// Skip bounds checking for unbounded arrays (no constant size).
if(
array_type.id() == ID_array &&
!to_array_type(array_type).size().is_constant())
return;
Comment on lines +1596 to +1600
Comment on lines +1596 to +1600

std::string name = array_name(expr.array());

const exprt &index = expr.index();
Expand Down
Loading