Skip to content

Commit 65f885e

Browse files
author
Daniel Kroening
authored
Merge pull request #228 from smowton/fix_typecast_array_access
Fix typecast array access
2 parents aca88ca + 90d266f commit 65f885e

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed
612 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
public class arrayread1 {
2+
3+
static arrayread1 readback;
4+
5+
public static void main(int c) {
6+
7+
if(c!=1) return;
8+
arrayread1[] a = new arrayread1[c];
9+
readback=a[0];
10+
assert(readback==null);
11+
12+
}
13+
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
arrayread1.class
3+
--unwind 3 --no-propagation
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

src/solvers/flattening/bv_pointers.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ bvt bv_pointerst::convert_pointer_type(const exprt &expr)
296296
const typet &op_type=ns.follow(op.type());
297297

298298
if(op_type.id()==ID_pointer)
299-
return convert_pointer_type(op);
299+
return convert_bv(op);
300300
else if(op_type.id()==ID_signedbv ||
301301
op_type.id()==ID_unsignedbv ||
302302
op_type.id()==ID_bool ||

0 commit comments

Comments
 (0)