struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2051348.c
blobcc1a35b2d400f9efa85dda37354225043a14c2a4
1 /*
2 bug 2051348.
3 */
5 #include <testfwk.h>
7 #pragma disable_warning 85
9 typedef char BOOLEAN;
10 typedef signed char SHORTINT;
12 void App_PutSprite (SHORTINT x, SHORTINT y, SHORTINT spr)
16 static SHORTINT Labirint_objCell, Labirint_manX, Labirint_manY, Labirint_manDirX, Labirint_manDirY;
17 static BOOLEAN Labirint_manPresent;
19 static SHORTINT Labirint_GetManSprite (void)
21 return(0);
24 static BOOLEAN Labirint_ManCanGo (void)
26 return(0);
29 static BOOLEAN Labirint_ManGoing (SHORTINT x, SHORTINT y)
31 return(0);
34 static void Labirint_SetCell (SHORTINT x, SHORTINT y, SHORTINT cell)
38 static void Labirint_TryMoveMan (void)
40 SHORTINT x, y, manSprite;
41 if (Labirint_ManCanGo()) {
42 x = (Labirint_manX + Labirint_manDirX) + Labirint_manDirX;
43 y = (Labirint_manY + Labirint_manDirY) + Labirint_manDirY;
44 Labirint_manPresent = Labirint_ManGoing(x, y);
45 if (!Labirint_manPresent) {
46 return;
48 manSprite = Labirint_GetManSprite();
49 Labirint_SetCell(x, y, manSprite);
50 App_PutSprite(Labirint_manX, Labirint_manY, 0);
51 // Assembly fails for the next two lines.
52 Labirint_manX = Labirint_manX + Labirint_manDirX;
53 Labirint_manY = Labirint_manY + Labirint_manDirY;
54 } else {
55 manSprite = 4;
57 App_PutSprite(Labirint_manX, Labirint_manY, manSprite);
60 void
61 testBug2051348(void)
63 ASSERT(1);