From d9cfa9135da456e87722f38c87127c25812bf3f8 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 17 Jan 2009 16:25:08 +0000 Subject: [PATCH] Made sure that timer variables are always considered read-only when passed around This fixes a usage checking problem in cgtest08 where the variable would be considered written-to in parallel because it was passed twice in parallel (and not marked as a VAL abbrev) --- checks/UsageCheckUtils.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/checks/UsageCheckUtils.hs b/checks/UsageCheckUtils.hs index 8b0c005..4fb6027 100644 --- a/checks/UsageCheckUtils.hs +++ b/checks/UsageCheckUtils.hs @@ -161,9 +161,10 @@ getVarProcCall (A.ProcCall _ proc as) getVarActual :: (Die m, CSMR m) => A.Formal -> A.Actual -> m Vars getVarActual _ (A.ActualExpression e) = return $ getVarExp e -getVarActual (A.Formal am _ _) (A.ActualVariable v) - = case am of - A.ValAbbrev -> return $ processVarR v +getVarActual (A.Formal am t _) (A.ActualVariable v) + = case (am, t) of + (A.ValAbbrev,_) -> return $ processVarR v + (_,A.Timer {}) -> return $ processVarR v _ -> return $ processVarW v Nothing {-