public static boolean variableStorageMatches(Variable var1, Variable var2) {
		Program program1 = var1.getFunction().getProgram();
		Program program2 = var2.getFunction().getProgram();
		VariableStorage storage =
			getCompatibleVariableStorage(program1, var1.getVariableStorage(), program2);
		if (storage == null || storage.isBadStorage()) {
			return false;
		}
		return storage.equals(var2.getVariableStorage());
	}
Determine if the specified variables have exactly the same storage.  This method
should not be used with caution if both arguments are parameters which use dynamically 
mapped storage.
@param var1
@param var2
@return true if variables have matching storage, else false
Ghidra/Features/Base/src/main/java/ghidra/program/util/DiffUtility.java