https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122892
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- >From the discussion of the OpenMP Issue 4665: For 'local static variables', it seems as if they are supposed to be permitted, also for COMMON blocks (as long as all are local static variables), but it is rather hard to implement. Hence: * For now it makes sense to reject those with a 'sorry, unimplemented' * Document this in the manual. * File a follow-up tracking bug, once this issue is solved? Otherwise, the allocation needs to be base on: gomp_thread ()->ts* getting the current contention group, pteam, thread. It seems, however, as also some callback needs to be registered that cleans up those variables when the region is left (or a list of memory to free). Thus, there seems to be some libgomp routine required that is always called upon entering those procedures (or scoped block), passing the variable and its initializer along (and either one per cgroup, pteam, thread - or three functions) - and inside libgomp, this needs to be tracked.
