https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67726
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- For --enable-threads=posix the current code is probably OK, as __gthread_cond_wait should never return an error when used correctly, so will only throw when the program already has UB. We should fix it for other thread models though.