[Bug c++/81589] New: Possible False-Positive with decltype
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81589 Bug ID: 81589 Summary: Possible False-Positive with decltype Product: gcc Version: 7.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hunter at openrobotics dot org Target Milestone: --- I can confirm that this effects GCC-8.0 svn as well (have not tested with GCC-6). There's a header file which compiles just fine with GCC-5.4.0 (and GCC-4.9.4), but fails to compile with GCC-7.1.1 and GCC-8.0. Please note that I'm only reporting this because of the inconsistency. error: decltype cannot resolve address of overloaded function The problematic line is reported as this one: using arguments = typename tuple_tail< typename function_traits::arguments>::type; In this context: #include #include #include namespace rclcpp { namespace runction_traits { template struct tuple_tail; template struct tuple_tail> { using type = std::tuple; }; // std::function template struct function_traits { using arguments = typename tuple_tail< typename function_traits::arguments>::type; static constexpr std::size_t arity = std::tuple_size::value; template using argument_type = typename std::tuple_element::type; using return_type = typename function_traits::return_type; }; /* other structs follow */ } } I'll attach the precompiler output from my computer with GCC 8 on it. I'll also note that our library, rclcpp, does compile with GCC 8, but, when we try to compile our tests or use the library elsewhere, the compiler throws errors. I'm super hesitant in reporting this, but I just can't see anything wrong in the code, and the inconsistency is certainly an issue. It should error in GCC 5.4 if it's "bad" code (also note that the code is being compiled with the same standard, C++-14).
[Bug c++/81589] Possible False-Positive with decltype
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81589 --- Comment #1 from Hunter L. Allen --- Created attachment 41850 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41850&action=edit preprocesed file (compressed)
[Bug c++/81124] New: internal compiler error: in operator*, at cp/cp-tree.h:726
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81124 Bug ID: 81124 Summary: internal compiler error: in operator*, at cp/cp-tree.h:726 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hunter at openrobotics dot org Target Milestone: --- Got an internal compiler error, seems to be a regression. /home/allenh1/ros2_ws/src/ros2/rclcpp/rclcpp/src/rclcpp/parameter.cpp:254:65: internal compiler error: in operator*, at cp/cp-tree.h:726 std::to_string(const rclcpp::parameter::ParameterVariant & param) Here's the backtrace: 0x5e48d9 ovl_iterator::operator*() const ../../gcc-dev/gcc/cp/cp-tree.h:726 0x8c6a3e ovl_iterator::operator*() const ../../gcc-dev/gcc/cp/cp-tree.h:726 0x8c6a3e set_decl_namespace(tree_node*, tree_node*, bool) ../../gcc-dev/gcc/cp/name-lookup.c:4341 0x5c4f18 grokfndecl ../../gcc-dev/gcc/cp/decl.c:8605 0x8654a4 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ../../gcc-dev/gcc/cp/decl.c:12220 0x868e46 start_function(cp_decl_specifier_seq*, cp_declarator const*, tree_node*) ../../gcc-dev/gcc/cp/decl.c:15139 0x8e5e6f cp_parser_function_definition_from_specifiers_and_declarator ../../gcc-dev/gcc/cp/parser.c:26162 0x8e5e6f cp_parser_init_declarator ../../gcc-dev/gcc/cp/parser.c:19172 0x90280c cp_parser_simple_declaration ../../gcc-dev/gcc/cp/parser.c:12804 0x903535 cp_parser_block_declaration ../../gcc-dev/gcc/cp/parser.c:12629 0x8d9144 cp_parser_declaration ../../gcc-dev/gcc/cp/parser.c:12527 0x909b2b cp_parser_declaration_seq_opt ../../gcc-dev/gcc/cp/parser.c:12403 0x909e52 cp_parser_translation_unit ../../gcc-dev/gcc/cp/parser.c:4364 0x909e52 c_parse_file() ../../gcc-dev/gcc/cp/parser.c:38477 0xa09926 c_common_parse_file() ../../gcc-dev/gcc/c-family/c-opts.c:1104
[Bug c++/81124] internal compiler error: in operator*, at cp/cp-tree.h:726
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81124 --- Comment #1 from Hunter L. Allen --- preprocessed file was too large to be an attachment, so I made a gist for it: https://gist.github.com/allenh1/b5a3119e0c9322b50a7b2810411f9037
[Bug ipa/81360] [8 Regression] ice in estimate_edge_growth, at ipa-inline.h:86
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81360 Hunter L. Allen changed: What|Removed |Added CC||hunter at openrobotics dot org --- Comment #5 from Hunter L. Allen --- I'm also affected.
[Bug c++/82766] New: internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in get_inner_reference
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82766 Bug ID: 82766 Summary: internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in get_inner_reference Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hunter at openrobotics dot org Target Milestone: --- Hey all, got a likely regression that popped up with the latest svn source. ``` $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/allenh1/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-dev/configure --prefix=/home/allenh1 --enable-valgrind-annotations --with-java-home=/etc/java-config-2/current-system-vm --enable-languages=c,c++,fortran,lto,objc,go Thread model: posix gcc version 8.0.0 20171029 (experimental) (GCC) ``` The full compiler output is rather lengthy, so I made a gist of it. https://gist.github.com/allenh1/8c3c9fd5bade31d659699f773f6a8022 This is the important section, however: ``` /usr/include/asio/impl/read_until.hpp: In constructor ‘asio::detail::read_until_delim_string_op::read_until_delim_string_op(asio::detail::read_until_delim_string_op&&)’: /usr/include/asio/impl/read_until.hpp:550:55: internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in get_inner_reference, at expr.c:6999 delim_(ASIO_MOVE_CAST(std::string)(other.delim_)), ^ 0x698295 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc-dev/gcc/tree.c:9268 0xb53b81 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) ../../gcc-dev/gcc/tree.h:3202 0xb53b81 get_inner_reference(tree_node*, long*, long*, tree_node**, machine_mode*, int*, int*, int*) ../../gcc-dev/gcc/expr.c:6999 0xb9ac6b fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*) ../../gcc-dev/gcc/fold-const.c:7695 0xb9c139 fold_build1_loc(unsigned int, tree_code, tree_node*, tree_node*) ../../gcc-dev/gcc/fold-const.c:12068 In file included from /usr/include/asio/read_until.hpp:919:0, from /usr/include/asio.hpp:90, from /home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/include/fastrtps/rtps/resources/ResourceEvent.h:25, from /home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/src/cpp/rtps/resources/ResourceEvent.cpp:20: /usr/include/asio/impl/read_until.hpp: In constructor ‘asio::detail::read_until_delim_string_op::read_until_delim_string_op(asio::detail::read_until_delim_string_op&&)’: /usr/include/asio/impl/read_until.hpp:550:55: internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in get_inner_reference, at expr.c:6999 delim_(ASIO_MOVE_CAST(std::string)(other.delim_)), ^ 0x77d5ac cp_fold_convert(tree_node*, tree_node*) ../../gcc-dev/gcc/cp/cvt.c:607 COLLECT_GCC_OPTIONS='-D' 'ASIO_STANDALONE' '-D' 'BOOST_ASIO_STANDALONE' '-D' 'FASTRTPS_SOURCE' '-D' 'fastrtps_EXPORTS' '-I' '/usr/local/include' '-I' '/home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/include' '-I' '/home/allenh1/ros2_ws/build/fastrtps/include/fastrtps' '-I' '/home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/src/cpp' '-v' '-save-temps' '-Wall' '-Wpedantic' '-Wextra' '-Wno-unknown-pragmas' '-std=c++11' '-std=c++11' '-O3' '-D' 'NDEBUG' '-fPIC' '-o' 'CMakeFiles/fastrtps.dir/rtps/Endpoint.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /home/allenh1/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/cc1plus -fpreprocessed Endpoint.ii -quiet -dumpbase Endpoint.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/fastrtps.dir/rtps/Endpoint.cpp.o -O3 -Wall -Wpedantic -Wextra -Wno-unknown-pragmas -std=c++11 -std=c++11 -version -fPIC -o Endpoint.s GNU C++11 (GCC) version 8.0.0 20171029 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 8.0.0 20171029 (experimental), GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version isl-0.18-GMP GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU C++11 (GCC) version 8.0.0 20171029 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 8.0.0 20171029 (experimental),
[Bug c++/82766] internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in get_inner_reference
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82766 --- Comment #1 from Hunter L. Allen --- Created attachment 42499 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42499&action=edit preprocessed sources These are the three preprocessor files that threw internal compiler errors -- let me know if you need any others.