Skip to content

Commit

Permalink
Merged revision(s) 21428 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Fix] GCC 14 optimizer is still on crack.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.28@21432 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Aug 14, 2024
1 parent 8fcf65a commit 56406e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions soundlib/Load_xm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,8 @@ bool CSoundFile::ReadXM(FileReader &file, ModLoadingFlags loadFlags)
#define str_tooMuchPatternData ("Warning: File format limit was reached. Some pattern data may not get written to file.")
#define str_pattern ("pattern")

#if MPT_GCC_AT_LEAST(13, 0, 0) && MPT_GCC_BEFORE(14, 1, 0)
// work-around massively confused GCC 13 optimizer:
#if MPT_GCC_AT_LEAST(13, 0, 0) && MPT_GCC_BEFORE(15, 1, 0)
// work-around massively confused GCC 13/14 optimizer:
// /usr/include/c++/13/bits/stl_algobase.h:437:30: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing between 3 and 9223372036854775806 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
template <typename Tcont2, typename Tcont1>
static MPT_NOINLINE Tcont1 & gcc_append(Tcont1 & cont1, const Tcont2 & cont2) {
Expand Down Expand Up @@ -1034,7 +1034,7 @@ bool CSoundFile::SaveXM(std::ostream &f, bool compatibilityExport)
}
}

#if MPT_GCC_AT_LEAST(13, 0, 0) && MPT_GCC_BEFORE(14, 1, 0)
#if MPT_GCC_AT_LEAST(13, 0, 0) && MPT_GCC_BEFORE(15, 1, 0)
gcc_append(samples, additionalSamples);
#else
samples.insert(samples.end(), additionalSamples.begin(), additionalSamples.end());
Expand Down

0 comments on commit 56406e5

Please sign in to comment.