jartim 0 Posted July 10, 2018 Report Share Posted July 10, 2018 Bug description: Compiler generates incorrect code from mixed C++ and inline assembler - Steps to reproduce: The following is a sample section of code that generates the wrong address for _TestTemp+1 - void CPUTest() { unsigned char TestTemp[3]; asm { CPUTest_9: movlw 0xff ; set up locations ready to change movwf _TestTemp movwf _TestTemp+1 movwf _TestTemp+2 lfsr 0, _TestTemp+1 ; set up a pointer movlw 0x55 movwf _postdec0 } } Expected behaviour: In my application TestTemp[0] is located at 0x5C2, TestTemp[1] and [2] are at 0x5C3 and 0x5C4 respectively. The compiler should load fsr0 with the value 0x5C3 (_TestTemp+1), however the final generated code loads the value 0x5C2 instead. Is the problem 100% reproducible: 100% happens every time IDE version: MPLAB-X V4.20 Compiler: BoostC++ Compiler version: V7.43 Target device: PIC18F8527 OS: Win7 Comments: Quote Link to post Share on other sites
JorgeF 0 Posted July 10, 2018 Report Share Posted July 10, 2018 (edited) Hi Confirmed, both for C++ and C. Did you try to send an email to support@sourceboost.com ? Best regards Jorge Edited July 10, 2018 by JorgeF typo Quote Link to post Share on other sites
jartim 0 Posted July 11, 2018 Author Report Share Posted July 11, 2018 Hi Jorge No, not yet, I will do this today. I assumed that the forum was the first place to go to report an issue? Regards Tim Quote Link to post Share on other sites
JorgeF 0 Posted July 11, 2018 Report Share Posted July 11, 2018 Hi Usualy the forums are more targeted at experience exchange between users than to technical support. Same happens with the Microchip forum and a few others I know. Best regards Jorge 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.