OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [20050603-1.c] - Rev 322

Go to most recent revision | Compare with Previous | Blame | View Log

/* { 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;
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.