Bug #83196 buf0buf.ic:1171:51: compile error=logical-op - with -DCMAKE_BUILD_TYPE=Debug
Submitted: 29 Sep 2016 3:35 Modified: 29 Sep 2016 9:37
Reporter: Daniel Black Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.0 OS:Linux (ubuntu-16.04)
Assigned to: CPU Architecture:ARM

[29 Sep 2016 3:35] Daniel Black
Description:

compile error only with -DCMAKE_BUILD_TYPE=Debug and gcc-6

/source/storage/innobase/include/buf0buf.ic:1171:51: error: logical 'and' of equal expressions [-Werror=logical-op]
12:27:56   ut_ad(!rw_lock_own(hash_lock, RW_LOCK_X)
12:27:56                                       ~~~~         ^              
12:27:56 cc1plus: all warnings being treated as errors

How to repeat:
sudo -E add-apt-repository -y ppa:ubuntu-toolchain-r/test &&                     apt-get update && apt-get install -y gcc-6 g++-6

cmake /source -DCMAKE_BUILD_TYPE=Debug -DBUILD_CONFIG=mysql_release -DWITH_PROTOBUF=system -DWITH_NDB_JAVA=NO -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6 '-DCMAKE_C_FLAGS_RELWITHDEBINFO=-m64 -O3 -g -mtune=native' '-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-m64 -O3 -g -mtune=native' '-DCMAKE_C_FLAGS=-m64 -O3 -g -mtune=native' '-DCMAKE_CXX_FLAGS=-m64 -O3 -g -mtune=native' -DWITH_SSL=system -DCMAKE_INSTALL_PREFIX=/mysql/mysql-upstream-Debug-8.0 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 -DWITH_BOOST=/build/boost_1_60_0.tar.gz
12:25:17 -- Running cmake version 3.5.1
12:25:17 -- Found Git: /usr/bin/git (found version "2.7.4") 
12:25:17 -- Configuring with MAX_INDEXES = 64U
12:25:17 -- The C compiler identification is GNU 6.2.0
12:25:17 -- The CXX compiler identification is GNU 6.2.0
12:25:17 -- Check for working C compiler: /usr/bin/gcc-6
12:25:17 -- Check for working C compiler: /usr/bin/gcc-6 -- works

....
[29 Sep 2016 9:37] MySQL Verification Team
Hello Daniel,

Thank you for the report.
Verified as described.

Thanks,
Umesh