#508 FATAL Internal Error

closed-fixed
nobody
1
2013-05-25
2003-05-04
Bernhard Held
No

Reported by Vaclav Svoboda:

void korekce (char *retez)
{
unsigned char i, j;

// i = 0;
while (retez[i++])
{
;
}
if (i == 2)
j = 1;
retez[i+j-2] = ',';
}

mon7.c:12: warning: 'auto' variable 'i' may be used
before initialization at mon7.c(6)
mon7.c:12: error: FATAL Compiler Internal Error in file
'gen.c' line number '292' : Got a null symbol
Contact Author with source code
Caught signal 11: SIGSEGV

Initializing "i" fixes the problem. The source is nonsense,
but the compiler should swallow it.

Discussion

  • Erik Petrich
    Erik Petrich
    2003-10-19

    Logged In: YES
    user_id=635249

    The fatal error & SIGSEGV problem was recently fixed with
    the changes noted in ChangeLog 1.444.

    However, I am leaving this report open since there is still
    an underlying problem with the allocation of i. Something
    goes wrong with the mcs51, ds390, and z80 builds, but not
    the hc08 build. It's probably something in ralloc.c since
    much of hc08/ralloc.c is currently disabled.

     
  • Erik Petrich
    Erik Petrich
    2003-11-14

    • milestone: --> fixed
    • status: open --> closed-fixed
     
  • Erik Petrich
    Erik Petrich
    2003-11-14

    Logged In: YES
    user_id=635249

    This is compiling correctly now (or at least as correct as
    can be with the use of an uninitialized variable). Fixed by
    something between ChangLog 1.467 and 1.505; my best guess is
    Klaus's new live range code.