I can reproduce the issue in current SDCC. The issue also affects backends other than pic14 (I tried stm8).
I have extracted the affected function into the attached file.
Philipp
P.S.: I made a mistake. The code for stm8, mcs51 and z80 looks good. I don't know about pic14.
Last edit: Philipp Klaus Krause 2018-12-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to reproduce this using current SDCC [r10753] using the stm8 and pic14 backends, but couldn't. I tried:
Please provide a compileable reproducer for this issue.
Philipp
I have also tried mcs51 and could not reproduce.
Here is my code.
Changes made in eeprom.c
Build with build.sh
Results (from top to bottom):
I can reproduce the issue in current SDCC. The issue also affects backends other than pic14 (I tried stm8).
I have extracted the affected function into the attached file.
Philipp
P.S.: I made a mistake. The code for stm8, mcs51 and z80 looks good. I don't know about pic14.
Last edit: Philipp Klaus Krause 2018-12-13