https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602
--- Comment #4 from Xi Ruoyao <ryxi at stu dot xidian.edu.cn> --- By the way, in kernel code (compiler-gcc.h) there is a comment: /* The "volatile" is due to gcc bugs */ #define barrier() __asm__ __volatile__("": : :"memory") So the developer(s) actually think "volatile" is unnecessary, instead of the "memory" clobber.