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

            Bug ID: 89913
           Summary: [7/8/9 Regression] [concepts] ICE with invalid using
                    declaration
           Product: gcc
           Version: 9.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
                CC: paolo.carlini at oracle dot com
            Blocks: 67491
  Target Milestone: ---

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

=============================================
template<typename...> using A = auto;

template<typename... T> using B = A<T...>;
=============================================

bug.cc:1:33: error: 'auto' not allowed in alias declaration
    1 | template<typename...> using A = auto;
      |                                 ^~~~
bug.cc:3:41: internal compiler error: Segmentation fault
    3 | template<typename... T> using B = A<T...>;
      |                                         ^
0xf81b6f crash_signal
        ../../gcc/gcc/toplev.c:326
0x9e7869 get_underlying_template
        ../../gcc/gcc/cp/pt.c:6174
0xa0e8ef lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:9294
0xa0e8ef lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:9728
0xa3ac3b finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:3312
0x9b871d cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:16479
0x9b88b7 cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:23274
0x9bb9d0 cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:6693
0x9bb9d0 cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:6379
0x9b9073 cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:17837
0x9aeae5 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:17505
0x9c3478 cp_parser_type_specifier_seq
        ../../gcc/gcc/cp/parser.c:21983
0x9c0544 cp_parser_type_id_1
        ../../gcc/gcc/cp/parser.c:21812
0x9c52c3 cp_parser_type_id
        ../../gcc/gcc/cp/parser.c:21891
0x9c52c3 cp_parser_alias_declaration
        ../../gcc/gcc/cp/parser.c:19643
0x9d0ee7 cp_parser_template_declaration_after_parameters
        ../../gcc/gcc/cp/parser.c:27851
0x9d1617 cp_parser_explicit_template_declaration
        ../../gcc/gcc/cp/parser.c:28104
0x9d1617 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:28123
0x9d40e9 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:13185
0x9d473c cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4698
Please submit a full bug report, [etc.]

This is similar to PR84423, but hasn't been fixed yet.


Referenced Bugs:

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

Reply via email to