Resolve user types when checking parallel array access.
This commit is contained in:
parent
77be0c1137
commit
69b798735f
|
@ -160,7 +160,7 @@ checkArrayUsage sharedAttr (m,p)
|
||||||
let declNames = [x | Just x <- fmap (getDecl . snd) $ flattenParItems p]
|
let declNames = [x | Just x <- fmap (getDecl . snd) $ flattenParItems p]
|
||||||
when (fmap (Set.member sharedAttr) (Map.lookup arrName sharedNames) /= Just True && arrName `notElem` declNames) $
|
when (fmap (Set.member sharedAttr) (Map.lookup arrName sharedNames) /= Just True && arrName `notElem` declNames) $
|
||||||
do userArrName <- getRealName (A.Name undefined arrName)
|
do userArrName <- getRealName (A.Name undefined arrName)
|
||||||
arrType <- astTypeOf (A.Name undefined arrName)
|
arrType <- astTypeOf (A.Name undefined arrName) >>= resolveUserType m
|
||||||
arrLength <- case arrType of
|
arrLength <- case arrType of
|
||||||
A.Array (A.Dimension d:_) _ -> return d
|
A.Array (A.Dimension d:_) _ -> return d
|
||||||
-- Unknown dimension, use the maximum value for a (assumed 32-bit for INT) integer:
|
-- Unknown dimension, use the maximum value for a (assumed 32-bit for INT) integer:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user