summaryrefslogtreecommitdiff
path: root/Source/GPUVerify
diff options
context:
space:
mode:
authorGravatar Peter Collingbourne <peter@pcc.me.uk>2012-06-27 21:19:31 +0100
committerGravatar Peter Collingbourne <peter@pcc.me.uk>2012-06-27 21:19:31 +0100
commita6890cd19f416a548df8f13fde3e0bdd8adbc844 (patch)
tree518b4ebb2fab726f664d4e7b3e7f8cc36fd5aa65 /Source/GPUVerify
parent875484286cd181f202d19e551e57d29d7c74952f (diff)
GPUVerify: when building offset predicates, skip unsubstitutable offsets
Fixes Bugzilla bug #65.
Diffstat (limited to 'Source/GPUVerify')
-rw-r--r--Source/GPUVerify/RaceInstrumenter.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/GPUVerify/RaceInstrumenter.cs b/Source/GPUVerify/RaceInstrumenter.cs
index 10ab9355..620f7d1a 100644
--- a/Source/GPUVerify/RaceInstrumenter.cs
+++ b/Source/GPUVerify/RaceInstrumenter.cs
@@ -130,6 +130,9 @@ namespace GPUVerify
{
bool isConstant;
var def = verifier.varDefAnalyses[impl].SubstDefinitions(offset, impl.Name, out isConstant);
+ if (def == null)
+ continue;
+
if (isConstant)
{
offsetPreds.Add(Expr.Eq(offsetExpr, def));