https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71419
ktkachov at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|wrong-code |documentation Status|UNCONFIRMED |NEW Last reconfirmed| |2016-06-06 CC| |ktkachov at gcc dot gnu.org Known to work|5.3.0 | Summary|[6/7 Regression] cortex-a9 |interrupt attribute |IRQ |silently dropped for Thumb | |code on armv7-a Ever confirmed|0 |1 --- Comment #1 from ktkachov at gcc dot gnu.org --- The interrupt attribute only works for arm mode i.e. compile with -marm. That is because the LDM with exception return instruction is only available in ARM mode. For Thumb mode the attribute is silently ignored. That being said, we could handle it better. Currently for -mthumb the attribute still blocks tailcall optimisation, which it shouldn't do if it was properly ignored. So we could perhaps issue a warning or error in this situation, document the behaviour and properly discard the attribute when this occurs