Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1218 Fatal internal compiler error

closed-fixed
Maarten Brock
5
2013-05-25
2006-10-18
Anonymous
No

Hello,

I am using sdcc-2.6.0 on freebsd-current:

SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.0 #4309 (Oct 17 2006) (UNIX)

and got the following error message:

buf.c:175: error 9: FATAL Compiler Internal Error in file 'SDCCicode.c' line number '1746' : attempt to modify type of source
Contact Author with source code

The source code is attached to this report. After unpacking, step into
directory 'tensix' and execute

HOST=sdcc ARCH=cpc CONFIG=generic ./make.sh build

I'd be quite thankful for a short email notice if this was fixed. :)

Best regards,
Sven Klose <pixel@hugbox.org>

Discussion

  • tensix operating system

     
  • Logged In: NO

    I have cleaned up all code, so it compiles with gcc -ansi -Wall -Werror, but the problem remains.

    Best regards,
    Sven Klose <pixel@hugbox.org>

     
  • Maarten Brock
    Maarten Brock
    2008-02-26

    Logged In: YES
    user_id=888171
    Originator: NO

    This whole huge enormous bunch of code with numerous warnings could have been reduced to the following few lines to reproduce the error:

    8<-------------------------------------------------

    struct dequeue_node {
    struct dequeue_node *prev;
    struct dequeue_node *next;
    };

    struct dequeue_hdr {
    struct dequeue_node *first;
    struct dequeue_node *last;
    };

    void
    buf_print_owners (struct dequeue_hdr *list)
    {
    void *pi;

    for (pi = (void *) ((struct dequeue_hdr *) list)->first; pi != ((void*) 0); pi = (void *) ((struct dequeue_node *) pi)->next)
    {
    }
    }

    8<-------------------------------------------------

    Compile it for Z80 and it still fails.

     
  • Robert Larice
    Robert Larice
    2008-03-13

    Logged In: YES
    user_id=1840151
    Originator: NO

    further reduction is possible:

    ---<<8------------
    struct st_s {
    char el;
    };

    char foo (struct st_s *arg) {
    return ((struct st_s *) arg) -> el;
    }
    --->>8------------

    sdcc -c -mz80

    Robert Larice

     
  • Maarten Brock
    Maarten Brock
    2008-03-16

    Logged In: YES
    user_id=888171
    Originator: NO

    This one also failed for hc08 and mcs51 with --stack-auto or medium memory model.

    It is now fixed in svn #5101.

     
  • Maarten Brock
    Maarten Brock
    2008-03-16

    • labels: 355283 --> C-Front End
    • milestone: --> fixed
    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-fixed