Skip to content

Commit c08416e

Browse files
committed
Partially restore array handling in parameter context
1 parent c1132b5 commit c08416e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed
Binary file not shown.

regression/test_gen/array_parameter/TestGenTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ public class TestGenTest {
33

44
public static void test(int[] got, A[] got2, long[] got3) {
55

6-
assert(!(got != null && got[0] == 1 && got[1] == 2 && got2 != null && got2[0] != null && got2[1] != null && got2[0].x == 3 && got2[1].x == 4 && got3 != null && got3[0] == 100));
6+
assert(!(got != null && got.length == 2 && got[0] == 1 && got[1] == 2 && got2 != null && got2.length == 2 && got2[0] != null && got2[1] != null && got2[0].x == 3 && got2[1].x == 4 && got3 != null && got3.length == 1 && got3[0] == 100));
77

88
}
99

src/test_gen/java_test_source_factory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ void reference_factoryt::gather_referenced_symbols(const exprt& rhs, inputst& in
433433
{
434434
forall_operands(op_iter,rhs)
435435
{
436-
if(op_iter->type().id()==ID_pointer)
436+
if(op_iter->type().id()==ID_pointer ||
437+
(op_iter->type().id()==ID_struct && rhs.id()==ID_address_of))
437438
{
438439
symbol_exprt underlying=try_find_underlying_symbol_expr(*op_iter);
439440
if(underlying!=symbol_exprt())

0 commit comments

Comments
 (0)