http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53785
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-06-27 06:59:08 UTC --- The question comes, do we want to have a lock for each variable or one for the scope? One for each variable was easier to implement and might be more correct. What happens if getId has weird side effects depending on which thread calls it?