Scope is the question here. When you DIM SHARED subvar1 AS INTEGER, you make it available globally. If you create any sub or function, you can access subvar1 from there, change it, erase it, redimension it (if it's an array). However, if you instruct QB64 that a SUB/FUNCTION needs to have a parameter that's also named subvar1, QB64 will assume that for this new scope you want a subvar1 that's not an INTEGER (remember that not defining a type makes a variable of type SINGLE). The local subvar1 parameter takes precedence over the shared variable. They are separate entities.
Internally (in the C++ output) you'll have __INTEGER_SUBVAR1 and _SUB_CALC_SINGLE_SUBVAR1, which can be verified by looking in internal/temp/main.txt.