#1300 error 9: FATAL Compiler Internal Error

closed-fixed
Maarten Brock
5
2013-05-25
2007-02-27
Gregory Nutt
No

Compilation: sdcc -c -mmcs51 --stack-auto --xstack -I. -I/home/gnutt/projects/nuttx/nuttx/include compile-fail.c -o compile-fail.o

Reported Error: compile-fail.c:165: error 9: FATAL Compiler Internal Error in file 'gen.c' line number '440' : getFreePtr should never reach here

compile-fail.c: attached

Discussion

  • Gregory Nutt
    Gregory Nutt
    2007-02-27

     
    Attachments
  • Robert Larice
    Robert Larice
    2007-07-16

    Logged In: YES
    user_id=1840151
    Originator: NO

    the offending c code can be much reduced to

    ----------------------------------

    struct str {
    long aa;
    long bb;
    };

    struct str *v1;

    void foo() {
    struct str v2;
    struct str loc;

    v2.aa = 0;
    loc.bb = v1->bb;
    loc.aa = v1->aa - v2.aa;

    loc.bb += 0;
    }

    ----------------------------------

    compilation with sdcc #4882,
    options "-mmcs51 --stack-auto --xstack"
    results in

    error 9: FATAL Compiler Internal Error in file 'gen.c' line number '441' : getFreePtr should never reach here

    -----------------------

    Robert Larice

     
  • Robert Larice
    Robert Larice
    2007-07-16

    Logged In: YES
    user_id=1840151
    Originator: NO

    src/mcs51/gen.c getFreePtr() fails checking for:

    /* first check if r0 & r1 are used by this
    instruction, in which case we are in trouble */

     
  • Logged In: YES
    user_id=564030
    Originator: NO

    The category should be mcs51, not "C-Front End".

    Philipp

     
    • labels: 101552 --> mcs51(8051) target
     
  • Maarten Brock
    Maarten Brock
    2008-02-25

    Logged In: YES
    user_id=888171
    Originator: NO

    Fixed in SDCC 2.7.5 #5048.

     
  • Maarten Brock
    Maarten Brock
    2008-02-25

    • milestone: --> fixed
    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-fixed