https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99984
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:8cc863ca8f48662e9c9339710fa303587479bf71 commit r11-8075-g8cc863ca8f48662e9c9339710fa303587479bf71 Author: Jakub Jelinek <ja...@redhat.com> Date: Fri Apr 9 10:18:47 2021 +0200 libgomp: Silence false positive -Wmaybe-uninitialized warning [PR99984] pthread_setspecific second argument is const void *, so that one can call it even with pointers to const, but the function only stores the pointer and does nothing else, so the new assumption of -Wmaybe-uninitialized that functions taking such pointers will read from what those pointers will point to is wrong. Maybe it would be useful to have some whitelist of functions that surely don't do that. Anyway, in this case it is easy to workaround the warning by moving the pthread_setspecific call after the initialization without slowing anything down. 2021-04-09 Jakub Jelinek <ja...@redhat.com> PR libgomp/99984 * team.c (gomp_thread_start): Call pthread_setspecific for !(defined HAVE_TLS || defined USE_EMUTLS) only after local_thr has been initialized to avoid false positive warning.