Menu

#2363 FATAL Compiler Internal Error

closed-fixed
None
other
5
2020-08-10
2015-03-16
No

#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.

1 Attachments

Discussion

  • Oleg N. Cher

    Oleg N. Cher - 2015-03-16

    Also XDevCfg.h is need

     
  • Oleg N. Cher

    Oleg N. Cher - 2015-03-16

    C source duplicated (for more exact)

     
  • Oleg N. Cher

    Oleg N. Cher - 2015-03-16

    Admins, please rename ticket to "FATAL Compiler Internal Error"

     
  • Ben Shi

    Ben Shi - 2015-03-16
    • summary: Sorry for --> FATAL Compiler Internal Error
    • Category: other --> Z80
     
  • Philipp Klaus Krause

    I simplified the reproducer a bit and added a regression test in [r10454]. To reproduce the issue, disable the #define guard.

    Philipp

     
  • Sergey Belyashov

    • status: open --> closed-out-of-date
     
  • Sergey Belyashov

    Test bug-2363.c has been enabled because bug looks to be already fixed.

     
  • Erik Petrich

    Erik Petrich - 2020-08-08
    • status: closed-out-of-date --> open
    • Category: Z80 --> other
     
  • Erik Petrich

    Erik Petrich - 2020-08-08

    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

     
  • Erik Petrich

    Erik Petrich - 2020-08-10
    • status: open --> closed-fixed
    • assigned_to: Erik Petrich
     
  • Erik Petrich

    Erik Petrich - 2020-08-10

    Also fixed for ds390 in [r11809]

     

Log in to post a comment.