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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [20050603-1.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run { target powerpc*-*-* } } */
2
/* { dg-options "-O2" } */
3
#include <locale.h>
4
#include <stdlib.h>
5
register int *testreg asm ("r29");
6
 
7
int x;
8
int y;
9
int *ext_func (int *p) { return p; }
10
 
11
void test_reg_save_restore (int*) __attribute__((noinline));
12
void
13
test_reg_save_restore (int *p)
14
{
15
    setlocale (LC_ALL, "C");
16
    testreg = ext_func(p);
17
}
18
main() {
19
  testreg = &x;
20
  test_reg_save_restore (&y);
21
  if (testreg != &y)
22
    abort ();
23
  return 0;
24
}

powered by: WebSVN 2.1.0

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