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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20030928-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include <limits.h>
2
 
3
#if INT_MAX <= 32767
4
int main () { exit (0); }
5
#else
6
void get_addrs (const char**x, int *y)
7
{
8
  x[0] = "a1111" + (y[0] - 0x10000) * 2;
9
  x[1] = "a1112" + (y[1] - 0x20000) * 2;
10
  x[2] = "a1113" + (y[2] - 0x30000) * 2;
11
  x[3] = "a1114" + (y[3] - 0x40000) * 2;
12
  x[4] = "a1115" + (y[4] - 0x50000) * 2;
13
  x[5] = "a1116" + (y[5] - 0x60000) * 2;
14
  x[6] = "a1117" + (y[6] - 0x70000) * 2;
15
  x[7] = "a1118" + (y[7] - 0x80000) * 2;
16
}
17
 
18
int main ()
19
{
20
  const char *x[8];
21
  int y[8];
22
  int i;
23
 
24
  for (i = 0; i < 8; i++)
25
    y[i] = 0x10000 * (i + 1);
26
  get_addrs (x, y);
27
  for (i = 0; i < 8; i++)
28
    if (*x[i] != 'a')
29
      abort ();
30
  exit (0);
31
}
32
#endif

powered by: WebSVN 2.1.0

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