[Bug c++/79790] [C++17] ICE class template argument deduction failed

2017-03-01 Thread jochen.goert...@uni-konstanz.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79790

--- Comment #3 from Jochen Görtler <jochen.goert...@uni-konstanz.de> ---
This is the error:

template_class_deduction.cpp: In function ‘int main()’:
template_class_deduction.cpp:4:29: error: class template argument deduction
failed:
 std::array test = {1,2,3};
 ^
template_class_deduction.cpp:4:29: internal compiler error: Segmentation fault
0xd6c37f crash_signal
../../gcc-bug/gcc/toplev.c:337
0x61021e print_error_for_call_failure
../../gcc-bug/gcc/cp/call.c:4170
0x610e3a build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
../../gcc-bug/gcc/cp/call.c:4224
0x68be54 do_class_deduction
../../gcc-bug/gcc/cp/pt.c:25217
0x68be54 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
../../gcc-bug/gcc/cp/pt.c:25270
0x648972 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc-bug/gcc/cp/decl.c:6835
0x727c53 cp_parser_init_declarator
../../gcc-bug/gcc/cp/parser.c:19375
0x74bd0c cp_parser_simple_declaration
../../gcc-bug/gcc/cp/parser.c:12772
0x74cab5 cp_parser_block_declaration
../../gcc-bug/gcc/cp/parser.c:12597
0x74d569 cp_parser_declaration_statement
../../gcc-bug/gcc/cp/parser.c:12207
0x725893 cp_parser_statement
../../gcc-bug/gcc/cp/parser.c:10694
0x72692d cp_parser_statement_seq_opt
../../gcc-bug/gcc/cp/parser.c:11026
0x7269ff cp_parser_compound_statement
../../gcc-bug/gcc/cp/parser.c:10980
0x726b93 cp_parser_function_body
../../gcc-bug/gcc/cp/parser.c:21427
0x726b93 cp_parser_ctor_initializer_opt_and_function_body
../../gcc-bug/gcc/cp/parser.c:21465
0x727411 cp_parser_function_definition_after_declarator
../../gcc-bug/gcc/cp/parser.c:26252
0x7280fd cp_parser_function_definition_from_specifiers_and_declarator
../../gcc-bug/gcc/cp/parser.c:26164
0x7280fd cp_parser_init_declarator
../../gcc-bug/gcc/cp/parser.c:19154
0x74bd0c cp_parser_simple_declaration
../../gcc-bug/gcc/cp/parser.c:12772
0x74cab5 cp_parser_block_declaration
../../gcc-bug/gcc/cp/parser.c:12597
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.

[Bug c++/79790] [C++17] ICE class template argument deduction failed

2017-03-01 Thread jochen.goert...@uni-konstanz.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79790

--- Comment #2 from Jochen Görtler <jochen.goert...@uni-konstanz.de> ---
The bug can also be reproduced in the compiler explorer:
https://godbolt.org/g/3NBvoL

[Bug c++/79790] [C++17] ICE class template argument deduction failed

2017-03-01 Thread jochen.goert...@uni-konstanz.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79790

--- Comment #1 from Jochen Görtler <jochen.goert...@uni-konstanz.de> ---
Using built-in specs.
COLLECT_GCC=../gcc-bug/bin/g++
COLLECT_LTO_WRAPPER=/home/jochen/Developer/gcc-bug/libexec/gcc/x86_64-pc-linux-gnu/7.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-bug/configure --prefix=/home/jochen/Developer/gcc-bug
--enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 7.0.1 20170301 (experimental) (GCC)

[Bug c++/79790] New: [C++17] ICE class template argument deduction failed

2017-03-01 Thread jochen.goert...@uni-konstanz.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79790

Bug ID: 79790
   Summary: [C++17] ICE class template argument deduction failed
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jochen.goert...@uni-konstanz.de
  Target Milestone: ---

Created attachment 40865
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40865=edit
Minimal test case