diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-01-24 14:07:00 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-02-02 10:39:52 +0000 |
commit | c858cc76099db0af82a264b3c6f921a287cfcb42 (patch) | |
tree | 2d2c13cb1f8c3b9ff2875b99c2080bcea887d8bb | |
parent | 65819c339945a97fa642c8010321e0cbe8ddc107 (diff) | |
download | qtwebengine-chromium-c858cc76099db0af82a264b3c6f921a287cfcb42.tar.gz |
Work-around internal compiler error in gcc 7 and 8v5.10.1
The compiler crashes when trying to resolve a compile time division.
We can avoid it being compile-time by making the function producing the
numbers non-inline.
Change-Id: I152c4955ef974c7b45bb1f42d5ce8c55b9a2d7cc
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r-- | chromium/third_party/WebKit/Source/platform/audio/IIRFilter.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/chromium/third_party/WebKit/Source/platform/audio/IIRFilter.cpp b/chromium/third_party/WebKit/Source/platform/audio/IIRFilter.cpp index 7972d976674..0358bf55741 100644 --- a/chromium/third_party/WebKit/Source/platform/audio/IIRFilter.cpp +++ b/chromium/third_party/WebKit/Source/platform/audio/IIRFilter.cpp @@ -34,9 +34,15 @@ void IIRFilter::Reset() { buffer_index_ = 0; } -static std::complex<double> EvaluatePolynomial(const double* coef, - std::complex<double> z, - int order) { +#ifdef __GNUC__ +#define noinline __attribute__((noinline)) +#else +#define noinline +#endif + +static noinline std::complex<double> EvaluatePolynomial(const double* coef, + std::complex<double> z, + int order) { // Use Horner's method to evaluate the polynomial P(z) = sum(coef[k]*z^k, k, // 0, order); std::complex<double> result = 0; @@ -47,6 +53,8 @@ static std::complex<double> EvaluatePolynomial(const double* coef, return result; } +#undef noinline + void IIRFilter::Process(const float* source_p, float* dest_p, size_t frames_to_process) { |