From: <sv...@op...> - 2024-07-18 18:26:16
|
Author: manx Date: Thu Jul 18 20:26:04 2024 New Revision: 21200 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21200 Log: [Var] Add link to fix for <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049> (<https://gcc.gnu.org/g:5080840d8fbf25a321dd27543a1462d393d338bc>, <https://gcc.gnu.org/g:747c4b58573ea00419f64293a61537eb69f43307>). [Ref] Rename MPT_COMPILER_SETTING_QUIRK_GCC_NO_IPA_RA to MPT_COMPILER_SETTING_QUIRK_GCC_BROKEN_IPA and add comment about potentially affecting other passes and older versions as well. Modified: trunk/OpenMPT/common/BuildSettingsCompiler.h trunk/OpenMPT/src/mpt/base/detect_compiler.hpp Modified: trunk/OpenMPT/common/BuildSettingsCompiler.h ============================================================================== --- trunk/OpenMPT/common/BuildSettingsCompiler.h Thu Jul 18 20:23:07 2024 (r21199) +++ trunk/OpenMPT/common/BuildSettingsCompiler.h Thu Jul 18 20:26:04 2024 (r21200) @@ -44,7 +44,7 @@ #if MPT_COMPILER_GCC -#ifdef MPT_COMPILER_SETTING_QUIRK_GCC_NO_IPA_RA +#ifdef MPT_COMPILER_SETTING_QUIRK_GCC_BROKEN_IPA // See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049>. #if MPT_GCC_BEFORE(9, 0, 0) // Earlier GCC get confused about setting a global function attribute. @@ -56,7 +56,7 @@ #else #pragma GCC optimize("no-ipa-ra") #endif -#endif // MPT_COMPILER_SETTING_QUIRK_GCC_NO_IPA_RA +#endif // MPT_COMPILER_SETTING_QUIRK_GCC_BROKEN_IPA #endif // MPT_COMPILER_GCC Modified: trunk/OpenMPT/src/mpt/base/detect_compiler.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/detect_compiler.hpp Thu Jul 18 20:23:07 2024 (r21199) +++ trunk/OpenMPT/src/mpt/base/detect_compiler.hpp Thu Jul 18 20:26:04 2024 (r21200) @@ -207,12 +207,20 @@ // detect compiler setting quirks #if MPT_COMPILER_GCC +#if MPT_GCC_BEFORE(15, 0, 0) && !MPT_GCC_AT_LEAST(14, 2, 0) // GCC 14 causes severe miscompilation of inline functions on MinGW. // See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049>. // Current investigation suggests a general problem with -fipa-ra on non-ELF // platforms. +// As far as we understand the issue, it could possibly also manifest with +// other inter-procedure-optimizations and with older GCC versions. +// Fixed in GCC 15 +// (<https://gcc.gnu.org/git/?p=gcc.git;h=5080840d8fbf25a321dd27543a1462d393d338bc>) +// and GCC 14.2 +// (<https://gcc.gnu.org/git/?p=gcc.git;h=747c4b58573ea00419f64293a61537eb69f43307>). #if !defined(__ELF__) -#define MPT_COMPILER_SETTING_QUIRK_GCC_NO_IPA_RA +#define MPT_COMPILER_SETTING_QUIRK_GCC_BROKEN_IPA +#endif #endif #endif |