diff options
Diffstat (limited to 'gdbsupport/common-defs.h')
-rw-r--r-- | gdbsupport/common-defs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h index 07caf3b..cfdefe1 100644 --- a/gdbsupport/common-defs.h +++ b/gdbsupport/common-defs.h @@ -27,6 +27,14 @@ #pragma GCC optimize("-fno-hoist-adjacent-loads") #endif +#if defined (__GNUC__) && !defined (__clang__) \ + && ((__GNUC__ >= 12 && __GNUC__ <= 15) \ + || (__GNUC__ == 16 && __GNUC_MINOR__ < 1)) +/* Work around PR gcc/120987 starting gcc 12, and assume it will be fixed in + the gcc 16.1 release. */ +#pragma GCC optimize("-fno-ipa-modref") +#endif + #include <gdbsupport/config.h> #undef PACKAGE_NAME |