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

            Bug ID: 95936
           Summary: ICE in splice_late_return_type, at cp/pt.c:29114
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

This code, bug.cc. reduced by C-Reduce, makes GCC-trunk ICE.

$cat bug.cc
typedef (*a)()->const =


$g++ -fpermissive -w bug.cc 
bug.cc:1:17: internal compiler error: in splice_late_return_type, at
cp/pt.c:29114
    1 | typedef (*a)()->const =
      |                 ^~~~~
0x65832a splice_late_return_type(tree_node*, tree_node*)
        ../../gcc/cp/pt.c:29114
0x90aab6 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        ../../gcc/cp/decl.c:12205
0x915628 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/cp/decl.c:5233
0x9c1e6d cp_parser_init_declarator
        ../../gcc/cp/parser.c:20818
0x9a36d2 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13785
0x9cc926 cp_parser_declaration
        ../../gcc/cp/parser.c:13484
0x9cd06a cp_parser_translation_unit
        ../../gcc/cp/parser.c:4761
0x9cd06a c_parse_file()
        ../../gcc/cp/parser.c:44043
0xae4dbb c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1190
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.


$g++ --version
g++ (GCC) 11.0.0 20200626 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reply via email to