From c858cc76099db0af82a264b3c6f921a287cfcb42 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 24 Jan 2018 14:07:00 +0100 Subject: Work-around internal compiler error in gcc 7 and 8 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 --- .../third_party/WebKit/Source/platform/audio/IIRFilter.cpp | 14 +++++++++++--- 1 file 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 EvaluatePolynomial(const double* coef, - std::complex z, - int order) { +#ifdef __GNUC__ +#define noinline __attribute__((noinline)) +#else +#define noinline +#endif + +static noinline std::complex EvaluatePolynomial(const double* coef, + std::complex z, + int order) { // Use Horner's method to evaluate the polynomial P(z) = sum(coef[k]*z^k, k, // 0, order); std::complex result = 0; @@ -47,6 +53,8 @@ static std::complex EvaluatePolynomial(const double* coef, return result; } +#undef noinline + void IIRFilter::Process(const float* source_p, float* dest_p, size_t frames_to_process) { -- cgit v1.2.3