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<AsyncReadStream, Allocator, ReadHandler>::read_until_delim_string_op(asio::detail::read_until_delim_string_op<AsyncReadStream, Allocator, ReadHandler>&&)’: /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<AsyncReadStream, Allocator, ReadHandler>::read_until_delim_string_op(asio::detail::read_until_delim_string_op<AsyncReadStream, Allocator, ReadHandler>&&)’: /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), 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 0x956de9 build_static_cast_1 ../../gcc-dev/gcc/cp/typeck.c:6856 0x957504 build_static_cast(tree_node*, tree_node*, int) ../../gcc-dev/gcc/cp/typeck.c:7078 Compiler executable checksum: 2bf9a9f8376529dd9fafc1a5bd1b3c29 0x86e9c8 cp_parser_postfix_expression ../../gcc-dev/gcc/cp/parser.c:6696 0x87152a cp_parser_unary_expression ../../gcc-dev/gcc/cp/parser.c:8363 0x84e999 cp_parser_cast_expression ../../gcc-dev/gcc/cp/parser.c:9131 0x84f1d7 cp_parser_binary_expression ../../gcc-dev/gcc/cp/parser.c:9232 0x850ba4 cp_parser_assignment_expression ../../gcc-dev/gcc/cp/parser.c:9519 0x852fa6 cp_parser_parenthesized_expression_list ../../gcc-dev/gcc/cp/parser.c:7822 0x874040 cp_parser_mem_initializer ../../gcc-dev/gcc/cp/parser.c:14549 0x874040 cp_parser_mem_initializer_list ../../gcc-dev/gcc/cp/parser.c:14435 0x874040 cp_parser_ctor_initializer_opt ../../gcc-dev/gcc/cp/parser.c:14406 0x874040 cp_parser_ctor_initializer_opt_and_function_body ../../gcc-dev/gcc/cp/parser.c:21845 0x8769e6 cp_parser_function_definition_after_declarator ../../gcc-dev/gcc/cp/parser.c:26751 0x877bcc cp_parser_late_parsing_for_member ../../gcc-dev/gcc/cp/parser.c:27631 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. make[2]: *** [src/cpp/CMakeFiles/fastrtps.dir/build.make:231: src/cpp/CMakeFiles/fastrtps.dir/rtps/resources/TimedEvent.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... 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 0x77d5ac cp_fold_convert(tree_node*, tree_node*) ../../gcc-dev/gcc/cp/cvt.c:607 0x956de9 build_static_cast_1 ../../gcc-dev/gcc/cp/typeck.c:6856 0x957504 build_static_cast(tree_node*, tree_node*, int) ../../gcc-dev/gcc/cp/typeck.c:7078 0x86e9c8 cp_parser_postfix_expression ../../gcc-dev/gcc/cp/parser.c:6696 0x87152a cp_parser_unary_expression ../../gcc-dev/gcc/cp/parser.c:8363 0x84e999 cp_parser_cast_expression ../../gcc-dev/gcc/cp/parser.c:9131 0x84f1d7 cp_parser_binary_expression ../../gcc-dev/gcc/cp/parser.c:9232 0x850ba4 cp_parser_assignment_expression ../../gcc-dev/gcc/cp/parser.c:9519 0x852fa6 cp_parser_parenthesized_expression_list ../../gcc-dev/gcc/cp/parser.c:7822 0x874040 cp_parser_mem_initializer ../../gcc-dev/gcc/cp/parser.c:14549 0x874040 cp_parser_mem_initializer_list ../../gcc-dev/gcc/cp/parser.c:14435 0x874040 cp_parser_ctor_initializer_opt ../../gcc-dev/gcc/cp/parser.c:14406 0x874040 cp_parser_ctor_initializer_opt_and_function_body ../../gcc-dev/gcc/cp/parser.c:21845 0x8769e6 cp_parser_function_definition_after_declarator ../../gcc-dev/gcc/cp/parser.c:26751 0x877bcc cp_parser_late_parsing_for_member ../../gcc-dev/gcc/cp/parser.c:27631 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. 0x698295 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc-dev/gcc/tree.c:9268 make[2]: *** [src/cpp/CMakeFiles/fastrtps.dir/build.make:255: src/cpp/CMakeFiles/fastrtps.dir/rtps/resources/TimedEventImpl.cpp.o] Error 1 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 0x77d5ac cp_fold_convert(tree_node*, tree_node*) ../../gcc-dev/gcc/cp/cvt.c:607 0x956de9 build_static_cast_1 ../../gcc-dev/gcc/cp/typeck.c:6856 0x957504 build_static_cast(tree_node*, tree_node*, int) ../../gcc-dev/gcc/cp/typeck.c:7078 0x86e9c8 cp_parser_postfix_expression ../../gcc-dev/gcc/cp/parser.c:6696 0x87152a cp_parser_unary_expression ../../gcc-dev/gcc/cp/parser.c:8363 0x84e999 cp_parser_cast_expression ../../gcc-dev/gcc/cp/parser.c:9131 0x84f1d7 cp_parser_binary_expression ../../gcc-dev/gcc/cp/parser.c:9232 0x850ba4 cp_parser_assignment_expression ../../gcc-dev/gcc/cp/parser.c:9519 0x852fa6 cp_parser_parenthesized_expression_list ../../gcc-dev/gcc/cp/parser.c:7822 0x874040 cp_parser_mem_initializer ../../gcc-dev/gcc/cp/parser.c:14549 0x874040 cp_parser_mem_initializer_list ../../gcc-dev/gcc/cp/parser.c:14435 0x874040 cp_parser_ctor_initializer_opt ../../gcc-dev/gcc/cp/parser.c:14406 0x874040 cp_parser_ctor_initializer_opt_and_function_body ../../gcc-dev/gcc/cp/parser.c:21845 0x8769e6 cp_parser_function_definition_after_declarator ../../gcc-dev/gcc/cp/parser.c:26751 0x877bcc cp_parser_late_parsing_for_member ../../gcc-dev/gcc/cp/parser.c:27631 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. ``` And, later: ``` 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/writer/timedevent/../../resources/TimedEvent.h:25, from /home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/include/fastrtps/rtps/writer/timedevent/PeriodicHeartbeat.h:23, from /home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/include/fastrtps/rtps/writer/StatefulWriter.h:25, from /home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/include/fastrtps/rtps/messages/MessageReceiver.h:27, from /home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/src/cpp/rtps/participant/RTPSParticipantImpl.h:44, from /home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/src/cpp/rtps/resources/AsyncInterestTree.cpp:18: /usr/include/asio/impl/read_until.hpp: In constructor ‘asio::detail::read_until_delim_string_op<AsyncReadStream, Allocator, ReadHandler>::read_until_delim_string_op(asio::detail::read_until_delim_string_op<AsyncReadStream, Allocator, ReadHandler>&&)’: /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 0x77d5ac cp_fold_convert(tree_node*, tree_node*) ../../gcc-dev/gcc/cp/cvt.c:607 0x956de9 build_static_cast_1 ../../gcc-dev/gcc/cp/typeck.c:6856 0x957504 build_static_cast(tree_node*, tree_node*, int) ../../gcc-dev/gcc/cp/typeck.c:7078 0x86e9c8 cp_parser_postfix_expression ../../gcc-dev/gcc/cp/parser.c:6696 0x87152a cp_parser_unary_expression ../../gcc-dev/gcc/cp/parser.c:8363 0x84e999 cp_parser_cast_expression ../../gcc-dev/gcc/cp/parser.c:9131 0x84f1d7 cp_parser_binary_expression ../../gcc-dev/gcc/cp/parser.c:9232 0x850ba4 cp_parser_assignment_expression ../../gcc-dev/gcc/cp/parser.c:9519 0x852fa6 cp_parser_parenthesized_expression_list ../../gcc-dev/gcc/cp/parser.c:7822 0x874040 cp_parser_mem_initializer ../../gcc-dev/gcc/cp/parser.c:14549 0x874040 cp_parser_mem_initializer_list ../../gcc-dev/gcc/cp/parser.c:14435 0x874040 cp_parser_ctor_initializer_opt ../../gcc-dev/gcc/cp/parser.c:14406 0x874040 cp_parser_ctor_initializer_opt_and_function_body ../../gcc-dev/gcc/cp/parser.c:21845 0x8769e6 cp_parser_function_definition_after_declarator ../../gcc-dev/gcc/cp/parser.c:26751 0x877bcc cp_parser_late_parsing_for_member ../../gcc-dev/gcc/cp/parser.c:27631 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. make[2]: *** [src/cpp/CMakeFiles/fastrtps.dir/build.make:303: src/cpp/CMakeFiles/fastrtps.dir/rtps/resources/AsyncInterestTree.cpp.o] Error 1 ``` I'll compress and upload the preprocessed sources in a moment.