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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr43157.c] - Blame information for rev 708

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do link } */
2
/* { dg-require-effective-target lto } */
3
/* { dg-require-linker-plugin "" } */
4
/* { dg-options "-O1 -flto -fuse-linker-plugin" } */
5
 
6
#define LABEL3(pfx, x) # pfx x
7
#define LABEL2(pfx, x) LABEL3(pfx, x)
8
#define LABEL(x) LABEL2(__USER_LABEL_PREFIX__, x)
9
 
10
unsigned int factorial_ (unsigned int) __asm__ (LABEL ("factorial"));
11
 
12
unsigned int factorial (unsigned int i)
13
{
14
  return i > 1 ? i * factorial_ (i - 1) : 1;
15
}
16
 
17
int main (void)
18
{
19
  return factorial (5);
20
}

powered by: WebSVN 2.1.0

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