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

            Bug ID: 86950
           Summary: internal compiler error: unexpected expression
                    ‘void()’ of kind cast_expr
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

template <typename T>
auto f(T) -> decltype(void(), 1) { }

int
main ()
{
  f(0);
}

0x8d1e01 cxx_eval_constant_expression
        /home/mpolacek/src/gcc/gcc/cp/constexpr.c:4861
0x8cf490 cxx_eval_constant_expression
        /home/mpolacek/src/gcc/gcc/cp/constexpr.c:4485
0x8d451e cxx_eval_outermost_constant_expr
        /home/mpolacek/src/gcc/gcc/cp/constexpr.c:4970
0x8d7368 maybe_constant_value(tree_node*, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/constexpr.c:5197
0xa6b7b9 check_narrowing(tree_node*, tree_node*, int, bool)
        /home/mpolacek/src/gcc/gcc/cp/typeck2.c:909
0xa2b0c2 finish_decltype_type(tree_node*, bool, int)
        /home/mpolacek/src/gcc/gcc/cp/semantics.c:8917
0x9ab936 cp_parser_decltype
        /home/mpolacek/src/gcc/gcc/cp/parser.c:14296
0x9adcdf cp_parser_simple_type_specifier
        /home/mpolacek/src/gcc/gcc/cp/parser.c:17197
0x9a7d95 cp_parser_type_specifier
        /home/mpolacek/src/gcc/gcc/cp/parser.c:16982
0x9a8b62 cp_parser_type_specifier_seq
        /home/mpolacek/src/gcc/gcc/cp/parser.c:21253
0x9a8d81 cp_parser_type_id_1
        /home/mpolacek/src/gcc/gcc/cp/parser.c:21099
0x9a4977 cp_parser_trailing_type_id
        /home/mpolacek/src/gcc/gcc/cp/parser.c:21192
0x9a4977 cp_parser_late_return_type_opt
        /home/mpolacek/src/gcc/gcc/cp/parser.c:21017
0x9a4977 cp_parser_direct_declarator
        /home/mpolacek/src/gcc/gcc/cp/parser.c:20189
0x9a4977 cp_parser_declarator
        /home/mpolacek/src/gcc/gcc/cp/parser.c:20019
0x9b2891 cp_parser_init_declarator
        /home/mpolacek/src/gcc/gcc/cp/parser.c:19535
0x9b960a cp_parser_single_declaration
        /home/mpolacek/src/gcc/gcc/cp/parser.c:27432
0x9b974c cp_parser_template_declaration_after_parameters
        /home/mpolacek/src/gcc/gcc/cp/parser.c:27034
0x9b9fee cp_parser_explicit_template_declaration
        /home/mpolacek/src/gcc/gcc/cp/parser.c:27271
0x9b9fee cp_parser_template_declaration_after_export
        /home/mpolacek/src/gcc/gcc/cp/parser.c:27290
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.

Reply via email to