diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-06-27 19:29:35 +0100 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-06-27 19:29:35 +0100 |
commit | 875484286cd181f202d19e551e57d29d7c74952f (patch) | |
tree | 85d82cb8d296eac2ac4efb777b30de5d89ef6ec8 /Source/GPUVerify | |
parent | 3da043afb5b24a6acd0d28a611b11e2db3de0483 (diff) |
GPUVerify: use original expression for undefined variables
Fixes Bugzilla bug #64.
Diffstat (limited to 'Source/GPUVerify')
-rw-r--r-- | Source/GPUVerify/VariableDefinitionAnalysis.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/GPUVerify/VariableDefinitionAnalysis.cs b/Source/GPUVerify/VariableDefinitionAnalysis.cs index 8eee0be4..31f265ef 100644 --- a/Source/GPUVerify/VariableDefinitionAnalysis.cs +++ b/Source/GPUVerify/VariableDefinitionAnalysis.cs @@ -127,7 +127,8 @@ class VariableDefinitionAnalysis { if (namedDefMap.TryGetValue(v.Name, out def))
return def.Item1;
- def = defMap[v];
+ if (!defMap.TryGetValue(v, out def))
+ return e;
Expr defExpr;
if (def.Item1 == null)
defExpr = e;
|