| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
typedef char * ptr_t; |
| 4 |
struct __jmp_buf_tag { int mask; }; |
| 5 |
typedef struct __jmp_buf_tag sigjmp_buf[1]; |
| 6 |
sigjmp_buf GC_jmp_buf; |
| 7 |
int __sigsetjmp (sigjmp_buf, int); |
| 8 |
void GC_set_and_save_fault_handler (void (*)(int)); |
| 9 |
void GC_fault_handler(int sig) |
| 10 |
{ |
| 11 |
} |
| 12 |
void GC_setup_temporary_fault_handler() { |
| 13 |
GC_set_and_save_fault_handler(GC_fault_handler); |
| 14 |
} |
| 15 |
ptr_t GC_find_limit(ptr_t p) |
| 16 |
{ |
| 17 |
GC_setup_temporary_fault_handler(); |
| 18 |
if (__sigsetjmp (GC_jmp_buf, 1) == 0) |
| 19 |
for (;;) |
| 20 |
; |
| 21 |
} |