This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/85265] New: [concepts] ICE with missing identifier


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

            Bug ID: 85265
           Summary: [concepts] ICE with missing identifier
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: error-recovery, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
            Blocks: 67491
  Target Milestone: ---

The following invalid code snippet (compiled with "-fconcepts")
triggers an ICE since GCC 6.1.0:

=============================================
template<typename> concept bool C = true;

C{} void foo();
=============================================

bug99.cc:3:3: error: expected identifier before '}' token
 C{} void foo();
   ^
bug99.cc:3:3: internal compiler error: tree check: expected identifier_node,
have error_mark in find_local_binding, at cp/name-lookup.c:143
0x78cf20 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9322
0x620722 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/gcc/tree.h:3135
0x620722 find_local_binding
        ../../gcc/gcc/cp/name-lookup.c:143
0x9085f2 do_pushdecl
        ../../gcc/gcc/cp/name-lookup.c:2998
0x9085f2 pushdecl(tree_node*, bool)
        ../../gcc/gcc/cp/name-lookup.c:3148
0x95f65a process_template_parm(tree_node*, unsigned int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:4432
0x86575d process_introduction_parm
        ../../gcc/gcc/cp/constraint.cc:1376
0x86575d finish_template_introduction(tree_node*, tree_node*)
        ../../gcc/gcc/cp/constraint.cc:1408
0x944368 cp_parser_template_introduction
        ../../gcc/gcc/cp/parser.c:27066
0x944368 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:27170
0x949714 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:12767
0x949b31 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:12648
0x949e24 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4563
0x949e24 c_parse_file()
        ../../gcc/gcc/cp/parser.c:39029
0xa49bb6 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1132
Please submit a full bug report, [etc.]


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]