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/] [20031011-1.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
/* Check that MAX_EXPR and MIN_EXPR are working properly.  */
2
 
3
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
4
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
5
 
6
extern void abort (void);
7
 
8
int main()
9
{
10
  int ll_bitsize, ll_bitpos;
11
  int rl_bitsize, rl_bitpos;
12
  int end_bit;
13
 
14
  ll_bitpos = 32;  ll_bitsize = 32;
15
  rl_bitpos = 0;   rl_bitsize = 32;
16
 
17
  end_bit = MAX (ll_bitpos + ll_bitsize, rl_bitpos + rl_bitsize);
18
  if (end_bit != 64)
19
    abort ();
20
  end_bit = MAX (rl_bitpos + rl_bitsize, ll_bitpos + ll_bitsize);
21
  if (end_bit != 64)
22
    abort ();
23
  end_bit = MIN (ll_bitpos + ll_bitsize, rl_bitpos + rl_bitsize);
24
  if (end_bit != 32)
25
    abort ();
26
  end_bit = MIN (rl_bitpos + rl_bitsize, ll_bitpos + ll_bitsize);
27
  if (end_bit != 32)
28
    abort ();
29
  return 0;
30
}
31
 

powered by: WebSVN 2.1.0

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