1244541Sbrooks/* This test is part of GDB, the GNU debugger. 2244541Sbrooks 3244541Sbrooks Copyright 2017-2020 Free Software Foundation, Inc. 4244541Sbrooks 5244541Sbrooks This program is free software; you can redistribute it and/or modify 6244541Sbrooks it under the terms of the GNU General Public License as published by 7244541Sbrooks the Free Software Foundation; either version 3 of the License, or 8244541Sbrooks (at your option) any later version. 9244541Sbrooks 10244541Sbrooks This program is distributed in the hope that it will be useful, 11244541Sbrooks but WITHOUT ANY WARRANTY; without even the implied warranty of 12244541Sbrooks MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13244541Sbrooks GNU General Public License for more details. 14244541Sbrooks 15244541Sbrooks You should have received a copy of the GNU General Public License 16244541Sbrooks along with this program. If not, see <http://www.gnu.org/licenses/>. */ 17244541Sbrooks 18244541Sbrooks#include <pthread.h> 19244541Sbrooks#include <stdlib.h> 20244541Sbrooks 21244541Sbrooksint __thread foo = 0xdeadbeef; 22244541Sbrooks 23244541Sbrooksstatic void * 24244541Sbrooksthread_proc (void *arg) 25244541Sbrooks{ 26244541Sbrooks abort (); 27244541Sbrooks return arg; 28244541Sbrooks} 29244541Sbrooks 30244541Sbrooksint 31244541Sbrooksmain (void) 32244541Sbrooks{ 33244541Sbrooks pthread_t thread; 34244541Sbrooks 35244541Sbrooks pthread_create (&thread, NULL, thread_proc, NULL); 36244541Sbrooks pthread_join (thread, NULL); 37244541Sbrooks 38244541Sbrooks return 0; 39244541Sbrooks} 40244541Sbrooks