| 1 |
/* cse.c failure on x86 target. |
| 2 |
Contributed by Stuart Hastings 10 Oct 2002 <[email protected]> */ |
| 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 |
int |
| 22 |
main(void) |
| 23 |
{ |
| 24 |
unsigned int *vramPtr; |
| 25 |
int width; |
| 26 |
IOGBounds saveRect = global_saveRect; |
| 27 |
IOGBounds bounds = global_bounds; |
| 28 |
|
| 29 |
if (saveRect.minx < bounds.minx) saveRect.minx = bounds.minx; |
| 30 |
if (saveRect.maxx > bounds.maxx) saveRect.maxx = bounds.maxx; |
| 31 |
|
| 32 |
vramPtr = global_vramPtr + (saveRect.miny - bounds.miny) ; |
| 33 |
width = saveRect.maxx - saveRect.minx; |
| 34 |
|
| 35 |
if (width != expectedwidth) |
| 36 |
abort (); |
| 37 |
exit (0); |
| 38 |
} |