https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82152
Benjamin Buch <benni.buch at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |benni.buch at gmail dot com --- Comment #2 from Benjamin Buch <benni.buch at gmail dot com> --- Its the same on valid code via user defined deduction guide: struct Base {}; template<typename T> struct Derived : public Base { using Base::Base; }; Derived() -> Derived< void >; int main() { Derived x{}; } $ g++ -std=c++17 main.cpp main.cpp: In function 'int main()': main.cpp:11:13: internal compiler error: Segmentation fault Derived x{}; ^ 0xf25bdf crash_signal ../../gcc/gcc/toplev.c:325 0xa3ae4a tree_check(tree_node*, char const*, int, char const*, tree_code) ../../gcc/gcc/tree.h:3127 0xa3ae4a build_deduction_guide ../../gcc/gcc/cp/pt.c:25495 0xa0cd8d do_class_deduction ../../gcc/gcc/cp/pt.c:25709 0xa0cd8d do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) ../../gcc/gcc/cp/pt.c:25844 0x950893 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6796 0x9e94c6 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:19626 0x9f1958 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:12968 0x9f27b8 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:12793 0x9f31f9 cp_parser_declaration_statement ../../gcc/gcc/cp/parser.c:12387 0x9d0f93 cp_parser_statement ../../gcc/gcc/cp/parser.c:10848 0x9d1f00 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:11185 0x9d1fd7 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:11139 0x9e8460 cp_parser_function_body ../../gcc/gcc/cp/parser.c:21679 0x9e8460 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:21716 0x9e8d10 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:26620 0x9e99fb cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:26536 0x9e99fb cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:19405 0x9f1958 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:12968 0x9f27b8 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:12793 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. $ g++ --version g++ (GCC) 8.0.0 20180103 (experimental) Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.