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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 689 jeremybenn
 
2
/* { dg-do compile { target fpic } } */
3
/* { dg-options "-O2 -fPIC" } */
4
 
5
struct args
6
{
7
  short int matrix[8][8];
8
  char **current;
9
};
10
 
11
int test (struct args *args, char *init, int a, int b)
12
{
13
  int i, j, k;
14
 
15
  if (!args || a > b || a < 0)
16
    return -1;
17
 
18
  for (i = 0; i < 2; i++)
19
    {
20
      char *dest = *args->current;
21
      char *p = dest;
22
 
23
      for (j = 0; j < 8; j++)
24
        *p++ = *init++;
25
 
26
      for (k = 0; k < 8; k++)
27
        {
28
          short int *blockvals = &args->matrix[k][0];
29
          dest[0] += blockvals[0];
30
          dest[1] += blockvals[1];
31
          dest[2] += blockvals[2];
32
          dest[3] += blockvals[3];
33
          dest[4] += blockvals[4];
34
          dest[5] += blockvals[5];
35
          dest[6] += blockvals[6];
36
          dest[7] += blockvals[7];
37
       }
38
    }
39
 
40
  return 1;
41
}
42
 

powered by: WebSVN 2.1.0

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