https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53504

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Or maybe it's OK. The test is not trying to find out if threading works, only
whether TLS works. If creating or joining the thread fails, there is probably a
deeper issue. If creating and joining the thread works, then the important part
does the right thing. (a_in_other_thread == a_in_main_thread) being false makes
the program exit successfully, and we detect that TLS is supported.

The likelihood of linking with -pthread succeeding but pthread_create or
pthread_join failing is probably low, and so the check works in practice.

Reply via email to