Created attachment 30077 [details] Proposed fix. I have found an inconsistency in postreload.c: move2add_note_store(). While reload_combine_note_store() has been fixed to deal with PRE_MODIFY/POST_MODIFY in PR 47008 this change is missing for move2add_note_store(). This actually may lead to wrong code for the msp430 arch (which currently is not yet officially supported). But I think the code should be fixed anyway to avoid any surprise when some arch is triggering it. See the attached fix. This is the URL of the mspgcc bug report: https://sourceforge.net/p/mspgcc/bugs/353/
An RTL expert (not me) needs to figure out if this is still relevant.
r10-7617-g70b55b25aa14b60f0e0f0193f7178bae756076ad definitely fixed this issue so closing as a dup of bug 94516. "while move2add_note_store has some code to handle {PRE,POST}_{INC,DEC} without REG_INC note, it doesn't handle {PRE,POST}_MODIFY (that would be enough to fix this testcase)" *** This bug has been marked as a duplicate of bug 94516 ***