https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77714
Bug ID: 77714 Summary: Wrong code generation for gcc.c-torture/execute/pr51447.c Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: thopre01 at gcc dot gnu.org CC: bergner at vnet dot ibm.com Target Milestone: --- Host: x86_64-linux-gnu Target: arm-none-eabi Hi, GCC started to generate wrong coed for gcc.c-torture/execute/pr51447.c from r240065 on arm-none-eabi Cortex-M0 targets (no problem on other Cortex-M targets). The problem is that the stack is no longer properly adjusted after jumping from bar to nonlocal_lab. Dumps are identical until reload. Before this commit, reload will do the adjustment of the stack in r7 and then pro_and_epilogue will add a mov sp, r7. After the commit, the stack is adjusted in ip but pro_and_epilogue still generates a mov sp, r7. Please find attached the assembly output before and after as well as the dumps for ira, reload and pro_and_epilogue. Best regards.