Question about patch "bug.h: work around GCC PR82365 in BUG()"

From: Tiezhu Yang
Date: Fri Jul 26 2024 - 06:46:57 EST


Hi Arnd,

In the commit 173a3efd3edb "bug.h: work around GCC PR82365 in BUG()",
an empty inline assembly was added to work around GCC 7.0, I want to
know what is the status of this GCC bug, is it fixed or not?

If the GCC bug has been fixed, could you please tell me what is the
commit id of GCC? I can not find it in the bug link:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365

The default CONFIG_FRAME_WARN is 2048 on 64 bit system, I am not sure
whether it is time and proper to remove this workaround in the common
header include/linux/compiler-gcc.h totally, at least I want to remove
it in the arch specified header when compiling kernel with a newer GCC
version (for example GCC 12.1 or higher on LoongArch), something like
this:

+#ifdef barrier_before_unreachable
+#undef barrier_before_unreachable
+#define barrier_before_unreachable() do { } while (0)
+#endif

Thanks,
Tiezhu