Menu

#3282 Compiler Internal Error : Unimplemented conditional jump.

closed-fixed
None
other
5
2021-09-20
2021-09-19
No

sdcc 4.1 and the current svn (r12073) bring up an internal compiler error for a seemingly simple piece of C code.

martin@martin-debian-2:~/src/stm8_play$ make clean ; make
rm -f i2c.rel
sdcc --Werror --std-sdcc99 -mstm8 -c -o i2c.rel i2c.c
cond aop type 8, size 2
i2c.c:38: error 9: FATAL Compiler Internal Error in file 'gen.c' line number '8692' : Unimplemented conditional jump.
Contact Author with source code
cond aop type 8, size 2
make: *** [Makefile:10: i2c.rel] Error 1

I'll attach the Makefile and i2c.c, both reduced to the absolute minimum that's needed to reproduce the bug. Simple changes to the C code, e.g. removing the num < 1 check or removing the num == 2 if clause or the I2C_DR = val[1]; make the compilation succeed.

This code compiles as-is with sdcc 3.8.

Thanks in advance for looking at this. Of course, I'm happy to do more testing to help tracking down the issue.

1 Attachments

Discussion

  • Martin Kaiser

    Martin Kaiser - 2021-09-19

    oops, the Makefile wasn't attached. I'll try again

     
  • Philipp Klaus Krause

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

    Fixed in [r12685].

     

Log in to post a comment.

MongoDB Logo MongoDB