From 67e83ad8018cba7f080fab0c88d884c7c1b15f23 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Thu, 19 Apr 2007 17:19:20 +0000 Subject: [PATCH] Yet another fix for channel array reference generation --- fco2/GenerateC.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fco2/GenerateC.hs b/fco2/GenerateC.hs index d7a10be..cca59c7 100644 --- a/fco2/GenerateC.hs +++ b/fco2/GenerateC.hs @@ -259,10 +259,13 @@ genVariable v = do ps <- get am <- checkJust $ abbrevModeOfVariable ps v t <- checkJust $ typeOfVariable ps v + let isSub = case v of + A.Variable _ _ -> False + A.SubscriptedVariable _ _ _ -> True let prefix = case (am, t) of (_, A.Array _ _) -> "" - (A.Original, A.Chan _) -> "&" + (A.Original, A.Chan _) -> if isSub then "" else "&" (A.Abbrev, A.Chan _) -> "" (A.Original, A.UserDataType _) -> "&" (A.Abbrev, A.UserDataType _) -> ""