Skip to content

Commit

Permalink
Merged revision(s) 20798 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
  • Loading branch information
manxorist committed May 12, 2024
1 parent 13712c9 commit 95149b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/BuildSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@
#if MPT_COMPILER_GCC

#ifdef MPT_COMPILER_QUIRK_GCC_NO_O2
// See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049>.
#if defined(__OPTIMIZE__)
#pragma GCC optimize("O1")
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/mpt/base/detect_quirks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#if MPT_GCC_AT_LEAST(14, 0, 0) && MPT_GCC_BEFORE(15, 0, 0)
// GCC 14 causes severe miscompilation of inline functions.
// Link to bug report will follow.
// See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049>.
#if defined(__OPTIMIZE__)
#define MPT_COMPILER_QUIRK_GCC_NO_O2
#endif
Expand Down
1 change: 1 addition & 0 deletions src/mpt/check/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#ifndef MPT_CHECK_CXX_IGNORE_WARNING_O2
#if defined(MPT_COMPILER_QUIRK_GCC_NO_O2)
// See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049>.
MPT_WARNING("GCC 14 is known to cause severe miscompilation of inline functions. OpenMPT has forced optimization settings down to -O1. This comes at a roughly 15% performance cost. It is strongly recommended to stay with GCC 13 for the time being. You will need to edit the source to opt-out of this safety guard.")
#endif
#endif
Expand Down

0 comments on commit 95149b4

Please sign in to comment.