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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [pr27003.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 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.