2 /* { dg-require-effective-target split_stack } */
3 /* { dg-require-effective-target pthread_h } */
4 /* { dg-options "-pthread -fsplit-stack" } */
9 /* Use a noinline function to ensure that the buffer is not removed
11 static void use_buffer (char *buf) __attribute__ ((noinline));
13 use_buffer (char *buf)
18 /* Each recursive call uses 10,000 bytes. We call it 1000 times,
19 using a total of 10,000,000 bytes. If -fsplit-stack is not
20 working, that will overflow our stack limit. */
35 thread_routine (void *arg __attribute__ ((unused)))
48 i = pthread_create (&tid, NULL, thread_routine, NULL);
51 i = pthread_join (tid, &dummy);