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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr38048-2.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
extern void abort (void);
2
 
3
static int inv_J(int a[][2])
4
{
5
  int i, j;
6
  int det = 0.0;
7
   for (j=0; j<2; ++j)
8
     det += a[j][0] + a[j][1];
9
  return det;
10
}
11
 
12
int foo()
13
{
14
  int mat[2][2];
15
  mat[0][0] = 1;
16
  mat[0][1] = 2;
17
  mat[1][0] = 4;
18
  mat[1][1] = 8;
19
  return inv_J(mat);
20
}
21
 
22
int main()
23
{
24
  if (foo () != 15)
25
    abort ();
26
  return 0;
27
}
28
 

powered by: WebSVN 2.1.0

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