https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365
Tiezhu Yang <yangtiezhu at loongson dot cn> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yangtiezhu at loongson dot cn --- Comment #13 from Tiezhu Yang <yangtiezhu at loongson dot cn> --- There is a workaround for this bug in the Linux kernel header include/linux/compiler-gcc.h after the kernel commit 173a3efd3edb ("bug.h: work around GCC PR82365 in BUG()") in the year of 2018: #define barrier_before_unreachable() asm volatile("") Is it possible to fix this bug in the GCC and remove the workaround in the Linux kernel? Otherwise there is a new issue about objtool warning "unreachable instruction" if compiled with -Os rather than the default -O2. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/compiler-gcc.h#n46 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=173a3efd3edb [3] https://lore.kernel.org/loongarch/20240820123731.31568-2-yangtie...@loongson.cn/