https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99675
Bug ID: 99675 Summary: internal compiler error during template deduction Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lnwirz at chem dot helsinki.fi Target Milestone: --- Created attachment 50436 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50436&action=edit the code file, saved temps Hi folks, When compiling the attached (fairly) minimal example with g++-10.2.1 (debian/testing) with g++ --std=c++17 bug1.cpp I get bug1.cpp: In function ‘void lala()’: bug1.cpp:20:19: warning: alias template deduction only available with ‘-std=c++2a’ or ‘-std=gnu++2a’ 20 | vec3 foo(1, 2, 3); | ^ bug1.cpp:20:19: internal compiler error: in set_constraints, at cp/constraint.cc:1191 0x7fcbcfa72d09 __libc_start_main ../csu/libc-start.c:308 Please submit a full bug report, In g++-10.2.1 as shipped by debian testing, the std=c++17 is required for the failure. Comparing with compiler explorer (https://gcc.godbolt.org/z/d3dTff) shows that in trunk not even the c++17 argument is required and the output is source>: In function 'void lala()': <source>:20:19: warning: alias template deduction only available with '-std=c++20' or '-std=gnu++20' 20 | vec3 foo(1, 2, 3); | ^ <source>:20:19: internal compiler error: in set_constraints, at cp/constraint.cc:1255 0x1cfa259 internal_error(char const*, ...) ???:0 0x6ba797 fancy_abort(char const*, int, char const*) ???:0 0x73f122 set_constraints(tree_node*, tree_node*) ???:0 0x909361 do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) ???:0 0x7b2164 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ???:0 0x8e136d c_parse_file() ???:0 0xa5f962 c_common_parse_file() ???:0 Please submit a full bug report, let me know if more information is required. cheers, Lukas Wirz