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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [990106-2.c] - Blame information for rev 301

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

Line No. Rev Author Line
1 297 jeremybenn
unsigned calc_mp(unsigned mod)
2
{
3
      unsigned a,b,c;
4
      c=-1;
5
      a=c/mod;
6
      b=0-a*mod;
7
      if (b > mod) { a += 1; b-=mod; }
8
      return b;
9
}
10
 
11
int main(int argc, char *argv[])
12
{
13
      unsigned x = 1234;
14
      unsigned y = calc_mp(x);
15
 
16
      if ((sizeof (y) == 4 && y != 680)
17
          || (sizeof (y) == 2 && y != 134))
18
        abort ();
19
      exit (0);
20
}
21
 
22
 

powered by: WebSVN 2.1.0

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