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

            Bug ID: 85991
           Summary: [Concepts] Template placeholder: ICE
                    cp_parser_lookup_name, at cp/parser.c:26223
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hstong at ca dot ibm.com
  Target Milestone: ---

When a partial-concept-id is formed for a concept with a template prototype
template parameter, GCC ICEs.

### SOURCE (<stdin>):
template <template <typename> class, int> concept bool TmplC = true;
template <template <typename> class> struct A;
void f(A<TmplC<0>> *);


### COMPILER INVOCATION COMMAND:
g++ -fsyntax-only -xc++ -fconcepts -


### ACTUAL OUTPUT:
<stdin>:3:17: internal compiler error: in cp_parser_lookup_name, at
cp/parser.c:26223
0x58ed8d cp_parser_lookup_name
        ../../source/gcc/cp/parser.c:26223
0x680e29 cp_parser_primary_expression
        ../../source/gcc/cp/parser.c:5528
0x6825f5 cp_parser_primary_expression
        ../../source/gcc/cp/parser.c:5637
0x6825f5 cp_parser_template_argument
        ../../source/gcc/cp/parser.c:16465
0x6825f5 cp_parser_template_argument_list
        ../../source/gcc/cp/parser.c:16274
0x6825f5 cp_parser_enclosed_template_argument_list
        ../../source/gcc/cp/parser.c:27695
0x682f4e cp_parser_template_id
        ../../source/gcc/cp/parser.c:15917
0x683498 cp_parser_class_name
        ../../source/gcc/cp/parser.c:22491
0x68e837 cp_parser_qualifying_entity
        ../../source/gcc/cp/parser.c:6564
0x68e837 cp_parser_nested_name_specifier_opt
        ../../source/gcc/cp/parser.c:6250
0x6901a6 cp_parser_simple_type_specifier
        ../../source/gcc/cp/parser.c:17283
0x68a9f3 cp_parser_type_specifier
        ../../source/gcc/cp/parser.c:16956
0x696b2b cp_parser_decl_specifier_seq
        ../../source/gcc/cp/parser.c:13718
0x6971bb cp_parser_parameter_declaration
        ../../source/gcc/cp/parser.c:21607
0x697aef cp_parser_parameter_declaration_list
        ../../source/gcc/cp/parser.c:21433
0x697e43 cp_parser_parameter_declaration_clause
        ../../source/gcc/cp/parser.c:21362
0x687148 cp_parser_direct_declarator
        ../../source/gcc/cp/parser.c:20121
0x687148 cp_parser_declarator
        ../../source/gcc/cp/parser.c:19993
0x694b91 cp_parser_init_declarator
        ../../source/gcc/cp/parser.c:19509
0x69be63 cp_parser_simple_declaration
        ../../source/gcc/cp/parser.c:13150
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.


### EXPECTED OUTPUT:
(No ICE).


### COMPILER VERSION INFO (g++ -v):
Using built-in specs.
COLLECT_GCC=/opt/wandbox/gcc-head/bin/g++
COLLECT_LTO_WRAPPER=/opt/wandbox/gcc-head/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../source/configure --prefix=/opt/wandbox/gcc-head
--enable-languages=c,c++ --disable-multilib --without-ppl --without-cloog-ppl
--enable-checking=release --disable-nls --enable-lto
LDFLAGS=-Wl,-rpath,/opt/wandbox/gcc-head/lib,-rpath,/opt/wandbox/gcc-head/lib64,-rpath,/opt/wandbox/gcc-head/lib32
Thread model: posix
gcc version 9.0.0 20180528 (experimental) (GCC)

Reply via email to