2 bug-2363.c, SDCC got confused by the use of uninitialized variables, resulting in assertion failures.
7 #pragma disable_warning 84
11 typedef struct Durak_Card
{ signed char suit
, rank
; } Durak_Card
;
13 typedef Durak_Card Durak_Cards
[37];
15 #if !(defined(__SDCC_mcs51) && defined(__SDCC_MODEL_SMALL)) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) && !defined(__SDCC_pic14) // Not enough memory
16 static Durak_Cards Durak_hand
[2];
17 static Durak_Card Durak_desk
[13];
18 static signed char Durak_deskN
, Durak_trump
, Durak_badSuit
;
21 static void Durak_CpuMoves (void)
23 #if !(defined(__SDCC_mcs51) && defined(__SDCC_MODEL_SMALL)) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) && !defined(__SDCC_pic14) // Not enough memory
28 if (Durak_deskN
!= 0) {
29 if (Durak_desk
[X(Durak_deskN
, 13)].suit
== Durak_trump
&& Durak_desk
[X(i
- 1, 13)].suit
!= Durak_trump
) {
30 Durak_badSuit
= Durak_desk
[X(i
- 1, 13)].suit
;
33 while (l
<= _for__14
) {
36 if ((Durak_hand
[1][X(l
, 37)].rank
)) {
37 z
= Durak_hand
[1][X(i
, 37)].rank
* 10 + (signed char)(Durak_hand
[1][X(i
, 37)].suit
== Durak_trump
) * 111;