https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64888
--- Comment #3 from mikulas at artax dot karlin.mff.cuni.cz --- I think you should treat these artifical variables as private, not shared. If you treated them as shared, threads would race with each other when accessing them.