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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 688 jeremybenn
/* cse.c failure on x86 target.
2
   Contributed by Stuart Hastings 10 Oct 2002 <stuart@apple.com> */
3
#include <stdlib.h>
4
 
5
typedef signed short SInt16;
6
 
7
typedef struct {
8
    SInt16 minx;
9
    SInt16 maxx;
10
    SInt16 miny;
11
    SInt16 maxy;
12
} IOGBounds;
13
 
14
int expectedwidth = 50;
15
 
16
unsigned int *global_vramPtr = (unsigned int *)0xa000;
17
 
18
IOGBounds global_bounds = { 100, 150, 100, 150 };
19
IOGBounds global_saveRect = { 75, 175, 75, 175 };
20
 
21
main()
22
{
23
  unsigned int *vramPtr;
24
  int width;
25
  IOGBounds saveRect = global_saveRect;
26
  IOGBounds bounds = global_bounds;
27
 
28
  if (saveRect.minx < bounds.minx) saveRect.minx = bounds.minx;
29
  if (saveRect.maxx > bounds.maxx) saveRect.maxx = bounds.maxx;
30
 
31
  vramPtr = global_vramPtr + (saveRect.miny - bounds.miny) ;
32
  width = saveRect.maxx - saveRect.minx;
33
 
34
  if (width != expectedwidth)
35
    abort ();
36
  exit (0);
37
}

powered by: WebSVN 2.1.0

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