https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86706
Bug ID: 86706 Summary: GCC 8.2 ICE in build_base_path, at cp/class.c:294 Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eugene.zelenko at gmail dot com Target Milestone: --- Created attachment 44454 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44454&action=edit Problematic code snippet I experienced ICE in build_base_path, at cp/class.c:294 with GCC 8.2. 8.1 works fine on same code. I tried in-house built 8.2 as well as trunk GCC on Compiler Explorer. GCC command line and stack trace: /grid/common/test/gcc-v8.2.0rh65/bin/g++ -std=c++11 -g -m32 GCC82ICE.cc -c -o GCC82ICE.o GCC82ICE.cc: In constructor 'ContextCallback<T, D>::ContextCallback(int, bool)': GCC82ICE.cc:31:40: internal compiler error: in build_base_path, at cp/class.c:294 if ( !first_ || priority < first_->priority_ ) { ^~~~~~~~~ 0x5f1897 build_base_path(tree_code, tree_node*, tree_node*, int, int) /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/class.c:294 0x713a91 build_class_member_access_expr(cp_expr, tree_node*, tree_node*, bool, int) /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/typeck.c:2477 0x717e3b finish_class_member_access_expr(cp_expr, tree_node*, bool, int) /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/typeck.c:3000 0x68ecc0 cp_parser_postfix_dot_deref_expression /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:7622 0x69c0d7 cp_parser_postfix_expression /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:7269 0x69d0a1 cp_parser_unary_expression /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:8317 0x67f5e1 cp_parser_cast_expression /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:9085 0x68017d cp_parser_simple_cast_expression /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:27371 0x68017d cp_parser_binary_expression /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:9250 0x6814b4 cp_parser_assignment_expression /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:9481 0x681bd8 cp_parser_expression /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:9650 0x6a46d5 cp_parser_condition /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:11665 0x6894c6 cp_parser_selection_statement /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:11382 0x6894c6 cp_parser_statement /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:10817 0x68a3d0 cp_parser_statement_seq_opt /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:11275 0x68a47f cp_parser_compound_statement /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:11229 0x69f4d5 cp_parser_function_body /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:21799 0x69f4d5 cp_parser_ctor_initializer_opt_and_function_body /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:21836 0x69fcf0 cp_parser_function_definition_after_declarator /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:26865 0x6a09f0 cp_parser_function_definition_from_specifiers_and_declarator /tmp/gcc-v8.2.0rh65/gcc.source/gcc/cp/parser.c:26781