gcc/testsuite/gcc.target/powerpc/pr114846.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-require-effective-target builtin_eh_return } */ |
| 3 | |
| 4 | /* Ensure it runs successfully. */ |
| 5 | |
| 6 | __attribute__ ((noipa)) |
| 7 | int f (int *a, long offset, void *handler) |
| 8 | { |
| 9 | if (*a == 5) |
| 10 | return 5; |
| 11 | __builtin_eh_return (offset, handler); |
| 12 | } |
| 13 | |
| 14 | int main () |
| 15 | { |
| 16 | int t = 5; |
| 17 | if (f (&t, 0, 0) != 5) |
| 18 | __builtin_abort (); |
| 19 | return 0; |
| 20 | } |