https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84423
Bug ID: 84423 Summary: [concepts] ICE with invalid using declaration Product: gcc Version: 8.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 Blocks: 67491 Target Milestone: --- The following invalid code snippet (compiled with "-fconcepts") triggers an ICE scine GCC 6.1.0: ====================================================== template<typename> using A = auto; template<template<typename> class> struct B {}; B<A> b; ====================================================== bug.cc:1:34: error: typedef declared 'auto' template<typename> using A = auto; ^ bug.cc:5:4: internal compiler error: Segmentation fault B<A> b; ^ 0xeb0c3f crash_signal ../../gcc/gcc/toplev.c:325 0x95550a get_underlying_template ../../gcc/gcc/cp/pt.c:6055 0x97b798 convert_template_argument ../../gcc/gcc/cp/pt.c:7768 0x979bbb coerce_template_parms ../../gcc/gcc/cp/pt.c:8319 0x972dc6 lookup_template_class_1 ../../gcc/gcc/cp/pt.c:8855 0x972dc6 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:9204 0x9a2b3d finish_template_type(tree_node*, tree_node*, int) ../../gcc/gcc/cp/semantics.c:3183 0x920764 cp_parser_template_id ../../gcc/gcc/cp/parser.c:15824 0x92086e cp_parser_class_name ../../gcc/gcc/cp/parser.c:22344 0x92d30f cp_parser_qualifying_entity ../../gcc/gcc/cp/parser.c:6574 0x92d30f cp_parser_nested_name_specifier_opt ../../gcc/gcc/cp/parser.c:6260 0x93b0c0 cp_parser_template_introduction ../../gcc/gcc/cp/parser.c:26849 0x93b0c0 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:27006 0x9406e4 cp_parser_declaration ../../gcc/gcc/cp/parser.c:12756 0x940b01 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:12637 0x940df4 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4559 0x940df4 c_parse_file() ../../gcc/gcc/cp/parser.c:38860 0xa3eee6 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1132 Please submit a full bug report, [etc.] Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 [Bug 67491] [meta-bug] concepts issues