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

            Bug ID: 79967
           Summary: ICE on non-type template argument declared noreturn
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The following (presumably) ill-formed program triggers an ICE.  It doesn't
appear to be a regression.

$ cat t.C && gcc -S -Wall -Wextra -Wpedantic t.C
template <void f [[noreturn]]()>
struct A
{
  int g () { f (); }
};

void f ();

void g (A<f> a) { a.g (); }


t.C:1:31: internal compiler error: Segmentation fault
 template <void f [[noreturn]]()>
                               ^
0x11be4aa crash_signal
        /src/gcc/trunk/gcc/toplev.c:337
0x850518 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        /src/gcc/trunk/gcc/cp/decl.c:11408
0x9844eb cp_parser_template_parameter
        /src/gcc/trunk/gcc/cp/parser.c:15148
0x983882 cp_parser_template_parameter_list
        /src/gcc/trunk/gcc/cp/parser.c:14707
0x99a591 cp_parser_explicit_template_declaration
        /src/gcc/trunk/gcc/cp/parser.c:26535
0x99a6c0 cp_parser_template_declaration_after_export
        /src/gcc/trunk/gcc/cp/parser.c:26569
0x98383a cp_parser_template_declaration
        /src/gcc/trunk/gcc/cp/parser.c:14671
0x97fbfd cp_parser_declaration
        /src/gcc/trunk/gcc/cp/parser.c:12445
0x97f958 cp_parser_declaration_seq_opt
        /src/gcc/trunk/gcc/cp/parser.c:12372
0x96e794 cp_parser_translation_unit
        /src/gcc/trunk/gcc/cp/parser.c:4366
0x9bece8 c_parse_file()
        /src/gcc/trunk/gcc/cp/parser.c:38423
0xb720d6 c_common_parse_file()
        /src/gcc/trunk/gcc/c-family/c-opts.c:1107
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