Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@20798 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed May 12, 2024
1 parent afd9a20 commit f8e78fa
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 f8e78fa

Please sign in to comment.