Skip to content

Commit 65baaea

Browse files
danielsntedinski
authored andcommitted
Use NULL constant for null pointer IRep (rust-lang#704)
1 parent 939684c commit 65baaea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/cbmc/src/irep/to_irep.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@ impl ToIrep for ExprValue {
228228
],
229229
},
230230
ExprValue::Nondet => side_effect_irep(IrepId::Nondet, vec![]),
231+
ExprValue::PointerConstant(0) => Irep {
232+
id: IrepId::Constant,
233+
sub: vec![],
234+
named_sub: vector_map![(IrepId::Value, Irep::just_id(IrepId::NULL))],
235+
},
231236
ExprValue::PointerConstant(i) => Irep {
232237
id: IrepId::Constant,
233238
sub: vec![],

0 commit comments

Comments
 (0)