According to this, it is currently not supported:
Since variables are stored on the stack, they do not directly influence memory or storage, but they can be used as pointers to memory or storage locations in the built-in functions
mstore
,mload
,sstore
andsload
. Future dialects might introduce specific types for such pointers.