#include "SYSTEM.h"
typedef
struct Durak_Card { signed char suit, rank; } Durak_Card;
typedef
Durak_Card Durak_Cards[37];
static Durak_Cards Durak_hand[2];
static Durak_Card Durak_desk[13];
static signed char Durak_deskN, Durak_trump, Durak_badSuit;
static unsigned char Durak_CanAddOnDesk (signed char rank);
static void Durak_CpuMoves (void)
{
signed char i, j, l, eyesPhase, min;
signed int z;
signed char _for__14;
if (Durak_deskN != 0) { if (Durak_desk[__X(Durak_deskN, 13)].suit == Durak_trump && Durak_desk[__X(i - 1, 13)].suit != Durak_trump) { Durak_badSuit = Durak_desk[__X(i - 1, 13)].suit; } } while (l <= _for__14) { for (;;) { i = l; if ((Durak_hand[1][__X(l, 37)].rank)) { z = Durak_hand[1][__X(i, 37)].rank * 10 + (signed char)(Durak_hand[1][__X(i, 37)].suit == Durak_trump) * 111; } } }
}
Piece of output:
Contact Author with source code
Symbol iTemp8 at ic 16.
Durak.c:30: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/z80/gen.c' line number '1573' : Symbol in register, but no register assigned.
Contact Author with source code
Symbol iTemp8 at ic 16.
Durak.c:30: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/z80/gen.c' line number '1573' : Symbol in register, but no register assigned.
Contact Author with source code
Symbol iTemp8 at ic 16.
Durak.c:30: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/z80/gen.c' line number '1573' : Symbol in register, but no register assigned.
Contact Author with source code
Symbol iTemp8 at ic 16.
Durak.c:30: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/z80/gen.c' line number '1573' : Symbol in register, but no register assigned.
Contact Author with source code
Symbol iTemp8 at ic 16.
etc
sdcc Durak.c -mz80
SDCC 3.4.2 #9149 (Dec 29 2014)
Sorry for big piece of code and attached files, but this problem is very hard to replay.
Also XDevCfg.h is need
C source duplicated (for more exact)
Admins, please rename ticket to "FATAL Compiler Internal Error"
I simplified the reproducer a bit and added a regression test in [r10454]. To reproduce the issue, disable the #define guard.
Philipp
Test bug-2363.c has been enabled because bug looks to be already fixed.
Reopened because regression test still fails for ds390:
Internal error: validateOpType failed in OP_SYMBOL(IC_LEFT (ic)) @ .../src/ds390/gen.c:867: expected symbol, got null op
Also fixed for ds390 in [r11809]