djulien 0 Posted August 4, 2012 Report Share Posted August 4, 2012 (edited) Bug description: Optimization is leaving extra instructions in the example cases below. Steps to reproduce: Example 1: unsigned char var1, var2; var1 = var2 = 0; code generated: clrf var1 movlw 0 ;this instr is not needed clrf var2 Example 2: unsigned char var3, var4, var5; var3 = 3; var4 = var3; var5 = var3 + var4; code generated: movlw 3 movwf var3 movf var3, w ;this instr is not needed movwf var4 movf var4, w ;this instr is not needed addwf var3, w movwf var5 Expected behaviour: Example 1: clrf var1 clrf var2 Example 2: movlw 3 movwf var3 movwf var4 addwf var3, w movwf var5 Is the problem 100% reproduceable: yes Compiler: BoostC Compiler version: 7.10, 7.051 and 7.04 also (I didn't test prior to that) Target device: PIC16F1827, '1823, '688, etc. OS: Windows XP don Edited August 16, 2012 by djulien Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.