bug fix
authorbdemsky <bdemsky>
Tue, 12 Feb 2008 00:37:12 +0000 (00:37 +0000)
committerbdemsky <bdemsky>
Tue, 12 Feb 2008 00:37:12 +0000 (00:37 +0000)
Robust/src/Analysis/Locality/LocalityAnalysis.java

index ccc288031d95426fbbc2cbb495a8d9d7b22dcbdb..18c530a5fec00a810cbdb34e65154348f675f014 100644 (file)
@@ -528,6 +528,8 @@ public class LocalityAnalysis {
            if (!(srctype.equals(LOCAL)||srctype.equals(EITHER)))
                throw new Error("Writing possible global reference to local object in context:\n"+lb.getExplanation());
        } else if (dsttype.equals(GLOBAL)) {
+           if (srctype.equals(LOCAL) && fsen.getDst().getType().dereference().isPrimitive() && ! fsen.getDst().getType().dereference().isArray())
+               return;
            if (!(srctype.equals(GLOBAL)||srctype.equals(EITHER)))
                throw new Error("Writing possible local reference to global object in context:\n"+lb.getExplanation());
            if (!isatomic)