blob: 7ec96dbc09de7300253102f700f123d1ff18f496 [file] [log] [blame]
/* APPLE LOCAL file mainline */
/* { dg-do run { target powerpc*-*-* } } */
/* { dg-options "-O2" } */
#include <locale.h>
#include <stdlib.h>
register int *testreg asm ("r29");
int x;
int y;
int *ext_func (int *p) { return p; }
void test_reg_save_restore (int*) __attribute__((noinline));
void
test_reg_save_restore (int *p)
{
setlocale (LC_ALL, "C");
testreg = ext_func(p);
}
main() {
testreg = &x;
test_reg_save_restore (&y);
if (testreg != &y)
abort ();
return 0;
}