1/* { dg-do compile { target powerpc*-*-darwin* } } */
2/* { dg-require-effective-target ilp32 } */
3/* { dg-options "-mcpu=G3 -funwind-tables" } */
4/* { dg-final { scan-assembler "bl save_world" } } */
5/* { dg-final { scan-assembler ".byte\t0x6b" } } */
6
7/* Verify that on Darwin, even with -mcpu=G3, __builtin_eh_return
8   saves Altivec registers using save_world, and reports their
9   location in its EH information.  */
10
11long offset;
12void *handler;
13
14extern void setup_offset(void);
15
16void foo(void)
17{
18  __builtin_unwind_init ();
19  setup_offset();
20  __builtin_eh_return (offset, handler);
21}
22