The original preprocessed source
was obtained with /usr/bin/g++-7 -DENABLE_MPI=1 -DENABLE_TBB=1 -DHAVE_CONFIG_H -DMPICH_SKIP_MPICXX -DMPIPP_H -DMPI_NO_CPPBIND -D_TBB_CPP0X -I/builds/core/dune-common/build-cmake -I/builds/core/dune-common -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include -I/usr/lib/x86_64-linux-gnu/openmpi/include -std=c++17 -O2 -g -Wall -fdiagnostics-color=always -o standardtest_bool.ii -E -P /builds/core/dune-common/dune/common/simd/test/standardtest_bool.cc. This had to be modified manually to be accepted by g++-6: e.g. getting rid of __builtin_addressof() and the inline in front of constexpr variables. The result was then fed to creduce --n 4 --timeout 20 ./check.sh standardtest_bool.ii.
The environment for the reduce was a docker image produced from the following Dockerfile:
duneci@b95b8f64af9c:/builds/core/dune-common/build-cmake/dune/common/simd/test$ dpkg -l g++-?Desired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)||/ Name Version Architecture Description+++-=========================================-=========================-=========================-========================================================================================ii g++-6 6.4.0-1 amd64 GNU C++ compilerii g++-7 7.1.0-9 amd64 GNU C++ compilerduneci@b95b8f64af9c:/builds/core/dune-common/build-cmake/dune/common/simd/test$ g++-6 --versiong++-6 (Debian 6.4.0-1) 6.4.0 20170704Copyright (C) 2017 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.duneci@b95b8f64af9c:/builds/core/dune-common/build-cmake/dune/common/simd/test$ g++-7 --versiong++-7 (Debian 7.1.0-9) 7.1.0Copyright (C) 2017 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So this seems to be caused by -Wbool-operation. g++-6 does not have -Wbool-operation.
Oh, and here is the actual compiler output:
-*- mode: compilation; default-directory: "/builds/core/dune-common/build-cmake/dune/common/simd/test/gcc-6/hand/" -*-Compilation started at Wed Aug 30 17:13:07/usr/bin/g++-7 -std=c++11 -Wbool-operation standardtest_bool.ii -S -o /dev/nullstandardtest_bool.ii: In function 'decltype (~ c{}) call()':standardtest_bool.ii:1:52: warning: '~' on an expression of type bool [-Wbool-operation] template <class c> decltype(~c{}) call() { return ~false; } ^~~~~standardtest_bool.ii:1:52: note: did you mean to use logical not ('!')?standardtest_bool.ii: In substitution of 'template<class c> decltype (~ c{}) call() [with c = bool]':standardtest_bool.ii:2:25: required from herestandardtest_bool.ii:1:29: warning: '~' on an expression of type bool [-Wbool-operation] template <class c> decltype(~c{}) call() { return ~false; } ^~~~standardtest_bool.ii:1:29: note: did you mean to use logical not ('!')?standardtest_bool.ii: In substitution of 'template<class c> decltype (~ c{}) call() [with c = bool]':standardtest_bool.ii:2:25: required from herestandardtest_bool.ii:1:29: warning: '~' on an expression of type bool [-Wbool-operation]standardtest_bool.ii:1:29: note: did you mean to use logical not ('!')?standardtest_bool.ii: At global scope:standardtest_bool.ii:1:29: warning: '~' on an expression of type bool [-Wbool-operation]standardtest_bool.ii:1:29: note: did you mean to use logical not ('!')?'Internal compiler error: Error reporting routines re-entered.0x668771 cp_build_unary_op(tree_code, tree_node*, bool, int) ../../src/gcc/cp/typeck.c:59300x5b252f build_new_op_1 ../../src/gcc/cp/call.c:59950x5b2f6e build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ../../src/gcc/cp/call.c:60260x66738f build_x_unary_op(unsigned int, tree_code, cp_expr, int) ../../src/gcc/cp/typeck.c:54250x5ee034 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../src/gcc/cp/pt.c:168760x5e28d5 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../src/gcc/cp/pt.c:141430x5e28d5 tsubst(tree_node*, tree_node*, int, tree_node*) ../../src/gcc/cp/pt.c:141430x620982 dump_template_bindings ../../src/gcc/cp/error.c:3530x620982 dump_substitution ../../src/gcc/cp/error.c:14940x621242 dump_substitution ../../src/gcc/cp/cp-tree.h:55720x621242 dump_function_decl ../../src/gcc/cp/error.c:16490x6263e1 decl_to_string ../../src/gcc/cp/error.c:30330x6263e1 cp_printer ../../src/gcc/cp/error.c:36100x11c01a2 pp_format(pretty_printer*, text_info*) ../../src/gcc/pretty-print.c:6790x11c0a10 pp_format_verbatim(pretty_printer*, text_info*) ../../src/gcc/pretty-print.c:7380x11c0ae4 pp_verbatim(pretty_printer*, char const*, ...) ../../src/gcc/pretty-print.c:9390x61fa85 print_instantiation_full_context ../../src/gcc/cp/error.c:33880x624a68 maybe_print_instantiation_context ../../src/gcc/cp/error.c:35360x624a68 cp_diagnostic_starter ../../src/gcc/cp/error.c:32290x11b983e diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../src/gcc/diagnostic.c:962Please submit a full bug report,with preprocessed source if appropriate.Please include the complete backtrace with any bug report.See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.Compilation exited abnormally with code 1 at Wed Aug 30 17:13:07