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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This happens with std::thread too, not just std::jthread.

#include <thread>

int main() {
  std::thread t;
  if (t.get_id() == std::this_thread::get_id())
    throw 1;
  t.join();
}

It looks like the weak pthread_self() symbol is being called.

Reply via email to