[Bug c++/79056] [7/8 Regression] [C++17] ICE with broken deduction guide / broken template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79056 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED CC||jason at gcc dot gnu.org Resolution|--- |FIXED Target Milestone|--- |7.2 --- Comment #6 from Jason Merrill --- Fixed.
[Bug c++/79056] [7/8 Regression] [C++17] ICE with broken deduction guide / broken template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79056 --- Comment #5 from Jason Merrill --- Author: jason Date: Fri Jun 23 23:30:01 2017 New Revision: 249615 URL: https://gcc.gnu.org/viewcvs?rev=249615=gcc=rev Log: PR c++/79056 - C++17 ICE with invalid template syntax. * parser.c (cp_parser_simple_type_specifier): Don't assume that type is a TYPE_DECL. (cp_parser_check_for_invalid_template_id): Handle TYPE_DECL. * pt.c (template_placeholder_p): New. * cp-tree.h: Declare it. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/parse/template28.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/cp-tree.h branches/gcc-7-branch/gcc/cp/parser.c branches/gcc-7-branch/gcc/cp/pt.c
[Bug c++/79056] [7/8 Regression] [C++17] ICE with broken deduction guide / broken template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79056 --- Comment #5 from Jason Merrill --- Author: jason Date: Fri Jun 23 23:30:01 2017 New Revision: 249615 URL: https://gcc.gnu.org/viewcvs?rev=249615=gcc=rev Log: PR c++/79056 - C++17 ICE with invalid template syntax. * parser.c (cp_parser_simple_type_specifier): Don't assume that type is a TYPE_DECL. (cp_parser_check_for_invalid_template_id): Handle TYPE_DECL. * pt.c (template_placeholder_p): New. * cp-tree.h: Declare it. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/parse/template28.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/cp-tree.h branches/gcc-7-branch/gcc/cp/parser.c branches/gcc-7-branch/gcc/cp/pt.c
[Bug c++/79056] [7/8 Regression] [C++17] ICE with broken deduction guide / broken template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79056 --- Comment #4 from Jason Merrill --- Author: jason Date: Fri Jun 23 23:29:51 2017 New Revision: 249614 URL: https://gcc.gnu.org/viewcvs?rev=249614=gcc=rev Log: PR c++/79056 - C++17 ICE with invalid template syntax. * parser.c (cp_parser_simple_type_specifier): Don't assume that type is a TYPE_DECL. (cp_parser_check_for_invalid_template_id): Handle TYPE_DECL. * pt.c (template_placeholder_p): New. * cp-tree.h: Declare it. Added: trunk/gcc/testsuite/g++.dg/parse/template28.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/parser.c trunk/gcc/cp/pt.c
[Bug c++/79056] [7/8 Regression] [C++17] ICE with broken deduction guide / broken template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79056 --- Comment #4 from Jason Merrill --- Author: jason Date: Fri Jun 23 23:29:51 2017 New Revision: 249614 URL: https://gcc.gnu.org/viewcvs?rev=249614=gcc=rev Log: PR c++/79056 - C++17 ICE with invalid template syntax. * parser.c (cp_parser_simple_type_specifier): Don't assume that type is a TYPE_DECL. (cp_parser_check_for_invalid_template_id): Handle TYPE_DECL. * pt.c (template_placeholder_p): New. * cp-tree.h: Declare it. Added: trunk/gcc/testsuite/g++.dg/parse/template28.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/parser.c trunk/gcc/cp/pt.c --- Comment #5 from Jason Merrill --- Author: jason Date: Fri Jun 23 23:30:01 2017 New Revision: 249615 URL: https://gcc.gnu.org/viewcvs?rev=249615=gcc=rev Log: PR c++/79056 - C++17 ICE with invalid template syntax. * parser.c (cp_parser_simple_type_specifier): Don't assume that type is a TYPE_DECL. (cp_parser_check_for_invalid_template_id): Handle TYPE_DECL. * pt.c (template_placeholder_p): New. * cp-tree.h: Declare it. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/parse/template28.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/cp-tree.h branches/gcc-7-branch/gcc/cp/parser.c branches/gcc-7-branch/gcc/cp/pt.c
[Bug c++/79056] [7/8 Regression] [C++17] ICE with broken deduction guide / broken template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79056 Volker Reichelt changed: What|Removed |Added Keywords||error-recovery Last reconfirmed|2017-01-30 00:00:00 |2017-06-05 Summary|[C++17] ICE with broken |[7/8 Regression] [C++17] |deduction guide |ICE with broken deduction ||guide / broken template ||parameter --- Comment #3 from Volker Reichelt --- While Martin's example doesn't ICE for me, the following code snippet crashes with a very similar stack trace (when using -std=c++1z). Btw, it only takes a single space to make it valid: === template struct A {}; template void foo(A=A()) {} void bar() { foo(A()); } === PR79056.cc:3:41: error: template argument 1 is invalid template void foo(A=A()) {} ^ PR79056.cc:3:41: error: template argument 1 is invalid PR79056.cc:3:41: error: template argument 1 is invalid PR79056.cc:3:41: error: template argument 1 is invalid PR79056.cc:3:31: internal compiler error: Segmentation fault template void foo(A=A()) {} ^ 0xd724ef crash_signal ../../gcc/gcc/toplev.c:337 0x736779 cp_parser_check_for_invalid_template_id ../../gcc/gcc/cp/parser.c:2986 0x7390b5 cp_parser_check_for_invalid_template_id ../../gcc/gcc/cp/parser.c:2984 0x7390b5 cp_parser_simple_type_specifier ../../gcc/gcc/cp/parser.c:16945 0x726c8d cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:16499 0x727eda cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:13330 0x742d25 cp_parser_parameter_declaration ../../gcc/gcc/cp/parser.c:21183 0x7435ec cp_parser_parameter_declaration_list ../../gcc/gcc/cp/parser.c:20999 0x743a5c cp_parser_parameter_declaration_clause ../../gcc/gcc/cp/parser.c:20922 0x72a471 cp_parser_direct_declarator ../../gcc/gcc/cp/parser.c:19645 0x72a471 cp_parser_declarator ../../gcc/gcc/cp/parser.c:19521 0x72278c cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:19046 0x72381a cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:26719 0x7456dc cp_parser_template_declaration_after_parameters ../../gcc/gcc/cp/parser.c:26323 0x745364 cp_parser_explicit_template_declaration ../../gcc/gcc/cp/parser.c:26558 0x745364 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:26577 0x74d589 cp_parser_declaration ../../gcc/gcc/cp/parser.c:12449 0x74f0ab cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:12376 0x74f38a cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4366 0x74f38a c_parse_file() ../../gcc/gcc/cp/parser.c:38431 Please submit a full bug report, [etc.] This makes it a regression for GCC 7.