| 1 |
/* { dg-require-effective-target trampolines } */ |
| 2 |
|
| 3 |
/* Test that the GP gets properly restored, either by the nonlocal |
| 4 |
receiver or the nested function. */ |
| 5 |
|
| 6 |
typedef __SIZE_TYPE__ size_t; |
| 7 |
extern void abort (void); |
| 8 |
extern void exit (int); |
| 9 |
extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); |
| 10 |
|
| 11 |
int main () |
| 12 |
{ |
| 13 |
__label__ nonlocal; |
| 14 |
int compare (const void *a, const void *b) |
| 15 |
{ |
| 16 |
goto nonlocal; |
| 17 |
} |
| 18 |
|
| 19 |
char array[3]; |
| 20 |
qsort (array, 3, 1, compare); |
| 21 |
abort (); |
| 22 |
|
| 23 |
nonlocal: |
| 24 |
exit (0); |
| 25 |
} |