Comment 17 for bug 1722849

Revision history for this message
David Brown (davidbrown) wrote :

After some discussion in the gcc mailing list, one of the developers there declared it a bug in gcc - "asm volatile" statements can move across normal code, but not across other asm volatiles, volatile memory accesses, or other observable behaviour. He filed an upstream gcc bug, and also posted a patch:

<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602>

The patch is very simple, and should be directly applicable to any version of gcc as the relevant code has not changed in years.

Hopefully the gcc-arm-embedded folk will therefore be able to include it in all their currently open toolchain branches, to be included in their next releases.