Menu

#3678 error 9: FATAL Compiler Internal Error when using two sfrs

closed-fixed
None
Z80
5
2023-11-21
2023-11-20
No

I'm getting

op8_cost op: 4
src/main.c:6: error 9: FATAL Compiler Internal Error in file 'gen.c' line number '996' : code generator internal error
Contact Author with source code
op8_cost op: 4

with code like

__sfr changeBase;
__sfr LCDC_REG;

void main(void)
{
    LCDC_REG ^= changeBase;
}

sdcc version

SDCC : z80/sm83/mos6502 TD- 4.3.2 #14228 (MINGW64)

compiled with

sdcc -msm83 --no-std-crt0 --fsigned-char --use-stdout -D__PORT_sm83 -D__TARGET_gb -Wa-pogn -MMD --debug -Iobj/gb -Iinclude -c src/main.c -o obj/gb/main.o

Discussion

  • bbbbbr

    bbbbbr - 2023-11-21

    Subscribing to the ticket

    Also, for reference:
    _LCDC_REG = 0xFF4E ; LCD control
    .globl _LCDC_REG

     

    Last edit: bbbbbr 2023-11-21
  • Philipp Klaus Krause

    • assigned_to: Philipp Klaus Krause
    • Category: other --> Z80
     
  • Philipp Klaus Krause

    • status: open --> closed-fixed
     
  • Philipp Klaus Krause

    Fixed in [r14448]. The bug affected all bit-wise operations for z80 and sm83, and I also found and fixed a similar issue affecting one bitwise operation for pdk.

     

    Related

    Commit: [r14448]


Log in to post a comment.

MongoDB Logo MongoDB