https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85014

            Bug ID: 85014
           Summary: internal compiler error: in lookup_base, at
                    cp/search.c:185
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vegard.nossum at oracle dot com
                CC: webrown.cpp at gmail dot com
  Target Milestone: ---

Input:

struct {
  short a[__builtin_constant_p([] {
    struct {
      int b = b;
    };
  })];
};

Output:

$ cc1plus 
 <unnamed struct>::<lambda()>
<stdin>:5:5: error: abstract declarator '<unnamed struct>::<lambda()>::<unnamed
struct>' used as declaration
 static void<unnamed struct>::<lambda()>::_FUN() <unnamed
struct>::<lambda()>::operator void (*)()() const
<stdin>: At global scope:
<stdin>:4:15: internal compiler error: in lookup_base, at cp/search.c:185
0x12417d3 lookup_base(tree_node*, tree_node*, int, base_kind*, int)
        /home/vegard/git/gcc/gcc/cp/search.c:185
0x1319eaf maybe_dummy_object(tree_node*, tree_node**)
        /home/vegard/git/gcc/gcc/cp/tree.c:3904
0x12aa4de finish_non_static_data_member(tree_node*, tree_node*, tree_node*)
        /home/vegard/git/gcc/gcc/cp/semantics.c:1785
0x12aec62 finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*,
bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int)
        /home/vegard/git/gcc/gcc/cp/semantics.c:3726
0xf33f42 cp_parser_primary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:5611
0xf7698b cp_parser_postfix_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:7030
0xf2a4b7 cp_parser_unary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:8322
0xebfeca cp_parser_cast_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9090
0xec24f6 cp_parser_binary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9191
0xec62ca cp_parser_assignment_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9486
0xecc0a3 cp_parser_constant_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9770
0xed334e cp_parser_initializer_clause
        /home/vegard/git/gcc/gcc/cp/parser.c:21916
0xedc293 cp_parser_initializer
        /home/vegard/git/gcc/gcc/cp/parser.c:21856
0xedc4d1 cp_parser_late_parse_one_default_arg
        /home/vegard/git/gcc/gcc/cp/parser.c:27761
0xf15be0 cp_parser_late_parsing_nsdmi
        /home/vegard/git/gcc/gcc/cp/parser.c:27813
0xf15be0 cp_parser_class_specifier_1
        /home/vegard/git/gcc/gcc/cp/parser.c:22715
0xf231cb cp_parser_class_specifier
        /home/vegard/git/gcc/gcc/cp/parser.c:22768
0xf231cb cp_parser_type_specifier
        /home/vegard/git/gcc/gcc/cp/parser.c:16774
0xf8858a cp_parser_decl_specifier_seq
        /home/vegard/git/gcc/gcc/cp/parser.c:13629
0xfa3a70 cp_parser_simple_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:12938
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.

Version:

GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu)

Seems to start failing with "confused by earlier errors, bailing out" between
4.6.4 and 4.7.1 on godbolt.org.

Reply via email to