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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-do run } */
3
/* { dg-options "-Os" } */
4
 
5
unsigned int
6
foo (unsigned int x)
7
{
8
  unsigned int r = x;
9
  while (--x)
10
    r *= x;
11
  return r;
12
}
13
 
14
unsigned long long
15
bar (unsigned long long x)
16
{
17
  unsigned long long r = x;
18
  while (--x)
19
    r *= x;
20
  return r;
21
}
22
 
23
extern void abort (void);
24
 
25
int
26
main (void)
27
{
28
  if (foo (5) != 120 || bar (5) != 120)
29
    abort ();
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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