aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/common-defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport/common-defs.h')
-rw-r--r--gdbsupport/common-defs.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h
index 7dcaa5b..cfdefe1 100644
--- a/gdbsupport/common-defs.h
+++ b/gdbsupport/common-defs.h
@@ -1,6 +1,6 @@
/* Common definitions.
- Copyright (C) 1986-2024 Free Software Foundation, Inc.
+ Copyright (C) 1986-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -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