diff options
Diffstat (limited to 'gdbsupport/common-defs.h')
-rw-r--r-- | gdbsupport/common-defs.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h index 07caf3b..8d7e2a9 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 @@ -208,7 +216,6 @@ #include "errors.h" #include "print-utils.h" #include "common-debug.h" -#include "cleanups.h" #include "common-exceptions.h" #include "gdbsupport/poison.h" |