From 6e4efb94f077029e58b624873614a83e73e3e0cd Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 1 May 2019 23:22:09 +0300 Subject: [PATCH] OPTIMIZE(1) --- dbms/src/Formats/RowInputStreamWithDiagnosticInfo.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dbms/src/Formats/RowInputStreamWithDiagnosticInfo.cpp b/dbms/src/Formats/RowInputStreamWithDiagnosticInfo.cpp index 45bce165019..fe49b22081d 100644 --- a/dbms/src/Formats/RowInputStreamWithDiagnosticInfo.cpp +++ b/dbms/src/Formats/RowInputStreamWithDiagnosticInfo.cpp @@ -83,7 +83,13 @@ String DB::RowInputStreamWithDiagnosticInfo::getDiagnosticInfo() return out.str(); } -bool RowInputStreamWithDiagnosticInfo::deserializeFieldAndPrintDiagnosticInfo(const String & col_name, const DataTypePtr & type, +/** gcc-7 may generate wrong code with optimization level greater than 1. + * See tests: dbms/src/IO/tests/write_int.cpp + * and dbms/tests/queries/0_stateless/00898_parsing_bad_diagnostic_message.sh + * This is compiler bug. The bug does not present in gcc-8 and clang-8. + * Nevertheless, we don't need high optimization of this function. + */ +bool OPTIMIZE(1) RowInputStreamWithDiagnosticInfo::deserializeFieldAndPrintDiagnosticInfo(const String & col_name, const DataTypePtr & type, IColumn & column, WriteBuffer & out, size_t input_position)