OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr27003.c] - Blame information for rev 300

Go to most recent revision | 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.