https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93021
Bug ID: 93021 Summary: SP Clobber change prevents compilation of some bootloaders and operating systems Product: gcc Version: 9.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: inline-asm Assignee: unassigned at gcc dot gnu.org Reporter: rongithub at gmail dot com Target Milestone: --- GCC version 9.3.1 throws an error when inline asm code changes the stack pointer (see Bug IDs 11807 & 52813). This change causes GCC to fail when compiling boot loaders that set the SP before passing control to applications. For instance, the current Adafruit Metro M4 Express boot loader (https://github.com/adafruit/uf2-samdx1) will not compile using GCC v 9.3.1, but it builds with v 7.3.1 Perhaps adding a flag that allows the user to explicitly override this feature when compiling any application in which context changes occur that legitimately change the SP (e.g., boot loader, OS task switching) would address both issues.