#2067 Compiler crash

closed-fixed
Erik Petrich
z80 port (189)
5
2013-05-25
2012-08-16
No

The attached code nakes sdcc 3.2.1 #8062 invoked using --std-c99 -mz80 --opt-code-size test.c crash giving

test.c:36: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
test.c:42: error 9: FATAL Compiler Internal Error in file 'gen.c' line number '1555' : Symbol in register, but no register assigned.
Contact Author with source code
Symbol iTemp21 at ic 18.
Caught signal 11: SIGSEGV

This seems to be some weird interaction of register allocation and builtin functions.

Philipp

Discussion

  •  
    Attachments
  • Erik Petrich
    Erik Petrich
    2012-09-17

    I believe this is fixed with revision #8110.

    The error was occurring during the dry run pass. Although assign_operands_for_cost() ensures that all of the operands for the built-in SENDs are updated for the contemplated register assignment, inst_sane() was only called for the first SEND. iTemp21 was used the second SEND and was only half assigned to registers, leaving the code generator bewildered.

     
  • Erik Petrich
    Erik Petrich
    2012-09-17

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