I\'m watching this Introduction to OpenMP series of videos, and the presenter keeps repeating that \"heap is shared, stack is private\". It is also mentioned that data and text
The OpenMP standard makes no reference1 to stack or heap in it's memory model. So I would answer your question with implementation defined. I see no reason to move the data of stack variables to the heap if they are shared. If you see by looking at pointers of shared variables, that they are on the stack, I would in fact believe that.
Even the C standard contains no reference to either stack or heap.
In my opinion you should not use the concepts that aren't part of the standards (and hence depend on implementation) to reason about correctness. Instead use storage duration and scopes.
I speculate that Tim Mattson uses stack/heap because they may be more broadly known.
1 OpenMP allows control of the stacksize for threads, but with no further reference what the stack is.
even if you consider the simplification:
Your analysis is correct, the citation applies. As per 2.15.1.1, there is no predetermined data-sharing rule for objects with automatic storage duration that is not declared in a scope inside the construct. Hence it is a variable with implicitly determined data-sharing attributes.
2 Confusingly, the C standard uses "allocated storage duration" while C++ and OpenMP use "dynamic storage duration".