[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 --- Comment #13 from Jakub Jelinek --- I can confirm that, it got fixed with r8-9524-g20792b17f0e4672cdffd06209ddd330cd72d84a4
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #12 from Jason Merrill --- This seems to be fixed on gcc-8 branch now.
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 --- Comment #11 from Jakub Jelinek --- (In reply to Rimvydas (RJ) from comment #10) > Using 9.0.1 20190319 as reference several ICE cases reduce down to the same > snippet (regression on trunk)? None of these ICE on the trunk, there is a warning on the first one: warning: inline function ‘constexpr a::a()’ used but never defined What do you think the compiler does incorrectly? E.g. for the first testcase I guess it would be rejected if it is actually instantiated, but when not instantiated, I'd think it falls into the invalid, no diagnostic required category.
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 --- Comment #10 from Rimvydas (RJ) --- Using 9.0.1 20190319 as reference several ICE cases reduce down to the same snippet (regression on trunk)? $ cat trunk_accepts_invalid.ii class a { constexpr a(); }; template struct b { static constexpr a c{}; }; Using different tactics other two (hopefully valid) testcases: $ cat vcontract.ii template class a> struct b { template static int c; using d = decltype(c); }; template struct e { template bool f() const; template bool f(int) const; }; $ cat vdefault.ii template class> struct a; template class b> struct a; template struct c { template bool operator()(); template bool operator()(d); };
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 Jakub Jelinek changed: What|Removed |Added Keywords||ice-on-valid-code --- Comment #9 from Jakub Jelinek --- Another (hopefully valid) testcase, accepted by trunk, r269511 and clang++, all with -std=c++17, ICEs with r269512 and up. struct A; template class> struct B; template class T> struct B; template struct C { template int operator[] (int) const; template int operator[] (A) const; };
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 --- Comment #8 from Rimvydas (RJ) --- Created attachment 45995 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45995=edit Compressed original case (3.3M).
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 Jakub Jelinek changed: What|Removed |Added Keywords||accepts-invalid --- Comment #7 from Jakub Jelinek --- Indeed, the invalid testcase is now accepted: $ ./cc1plus.269511 -quiet pr89766.C -std=c++17 -fno-checking; echo $? pr89766.C:7:38: error: ‘template template bool d< >::e() const’ cannot be overloaded with ‘template template bool d< >::e() const’ template bool e() const; ^ pr89766.C:6:40: note: previous declaration ‘template template bool d< >::e() const’ template bool e() const; ^ 1 $ ./cc1plus.269512 -quiet pr89766.C -std=c++17 -fno-checking; echo $? 0
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 Jakub Jelinek changed: What|Removed |Added Keywords|ice-on-valid-code |ice-on-invalid-code Priority|P2 |P1 CC||jason at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- Started with r269512 aka PR88419 fix.
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 --- Comment #5 from Martin Liška --- (In reply to Rimvydas (RJ) from comment #4) > @Martin: Yes, ICE happens for valid code too only if -fchecking=1. Reduced > cases are invalid and rejected by 9.0.1 20190319 and 8.2.1 20181127. > However 8.3.1 20190319 accepts them even for -fchecking=0. Please attach the valid code snippet.
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 --- Comment #4 from Rimvydas (RJ) --- @Martin: Yes, ICE happens for valid code too only if -fchecking=1. Reduced cases are invalid and rejected by 9.0.1 20190319 and 8.2.1 20181127. However 8.3.1 20190319 accepts them even for -fchecking=0.
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 --- Comment #3 from Martin Liška --- @RJ: Btw. do you see the ICE also for a valid C++ code? The test-case you provided isn't valid if I'm correct?
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #2 from Martin Liška --- I can reproduce that, but only with GCC tip: gcc version 8.3.1 20190319 (GCC) $ ./xg++ -B. /home/marxin/Programming/testcases/pr89766.cpp -c -fchecking -std=c++17 --param ggc-min-expand=0 --param ggc-min-heapsize=0 /home/marxin/Programming/testcases/pr89766.cpp:7:47: internal compiler error: canonical types differ for identical types ‘a’ and ‘’ template bool e() const; ^ 0xa1338f comptypes(tree_node*, tree_node*, int) ../../gcc/cp/typeck.c:1480 0x98bae1 comp_template_parms(tree_node const*, tree_node const*) ../../gcc/cp/pt.c:3302 0x8579e5 add_method(tree_node*, tree_node*, bool) ../../gcc/cp/class.c:1062 0x9e201c finish_member_declaration(tree_node*) ../../gcc/cp/semantics.c:3114 0x95ffa5 cp_parser_template_declaration_after_parameters ../../gcc/cp/parser.c:27077 0x960419 cp_parser_explicit_template_declaration ../../gcc/cp/parser.c:27236 0x960473 cp_parser_template_declaration_after_export ../../gcc/cp/parser.c:27255 0x94bcfd cp_parser_template_declaration ../../gcc/cp/parser.c:15026 0x95a413 cp_parser_member_declaration ../../gcc/cp/parser.c:23552 0x95a306 cp_parser_member_specification_opt ../../gcc/cp/parser.c:23479 0x95891e cp_parser_class_specifier_1 ../../gcc/cp/parser.c:22610 0x95936a cp_parser_class_specifier ../../gcc/cp/parser.c:22872 0x94e900 cp_parser_type_specifier ../../gcc/cp/parser.c:16788 0x949dd0 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:13626 0x960585 cp_parser_single_declaration ../../gcc/cp/parser.c:27307 0x95fc98 cp_parser_template_declaration_after_parameters ../../gcc/cp/parser.c:26999 0x960419 cp_parser_explicit_template_declaration ../../gcc/cp/parser.c:27236 0x960473 cp_parser_template_declaration_after_export ../../gcc/cp/parser.c:27255 0x94bcfd cp_parser_template_declaration ../../gcc/cp/parser.c:15026 0x94824b cp_parser_declaration ../../gcc/cp/parser.c:12724 (gdb) p debug_tree(t1) > $3 = void (gdb) p debug_tree(t2) > (gdb) p debug_tree((tree)0x77a32a80) > (gdb) p debug_tree((tree)0x77a32f18) >
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 Richard Biener changed: What|Removed |Added Keywords||ice-checking, ||ice-on-valid-code Priority|P3 |P2 Known to work||8.1.0, 9.0 Known to fail||8.3.1
[Bug c++/89766] [8 Regression] ICE: canonical types differ for identical types, -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-03-19 CC||jakub at gcc dot gnu.org Version|unknown |8.3.1 Target Milestone|--- |8.4 Summary|ICE: canonical types differ |[8 Regression] ICE: |for identical types,|canonical types differ for |-std=c++17 |identical types, -std=c++17 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek --- I can reproduce on current 8.x branch, can't reproduce with 8.3.1 20190223, nor at 8.x branchpoint, nor gcc trunk.