[Bug c++/107484] [13 Regression] ICE: Segmentation fault (in decls_match)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107484 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #4 from Jason Merrill --- Fixed.
[Bug c++/107484] [13 Regression] ICE: Segmentation fault (in decls_match)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107484 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:0dfbb28a9549c2503204b0338bf550f1bff9c681 commit r13-6992-g0dfbb28a9549c2503204b0338bf550f1bff9c681 Author: Jason Merrill Date: Mon Apr 3 18:23:58 2023 -0400 c++: friend template matching [PR107484] Here friend matching tries to find a matching non-template friend and fails, so we mark the friend as a template specialization to be determined later. Then cplus_decl_attributes tries again to find a matching function and gets confused by DECL_TEMPLATE_INSTANTIATION without DECL_TEMPLATE_INFO. But it doesn't make sense for find_last_decl to be trying to match anything with DECL_USE_TEMPLATE set; those are matched elsewhere. PR c++/107484 gcc/cp/ChangeLog: * decl2.cc (find_last_decl): Return early if DECL_USE_TEMPLATE. gcc/testsuite/ChangeLog: * g++.dg/lookup/friend25.C: New test.
[Bug c++/107484] [13 Regression] ICE: Segmentation fault (in decls_match)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107484 Richard Biener changed: What|Removed |Added Keywords|ice-checking|accepts-invalid Priority|P2 |P1 --- Comment #2 from Richard Biener --- Also crashes with a release checking build: > ./cc1plus -quiet t.ii t.ii:5:52: internal compiler error: Segmentation fault 5 | friend void qualified_friend_no_match::f(double); |^ 0xe2c7af crash_signal /home/rguenther/src/trunk/gcc/toplev.cc:314 0x793c24 decls_match(tree_node*, tree_node*, bool) /home/rguenther/src/trunk/gcc/cp/decl.cc:1075 0x7b6de6 find_last_decl /home/rguenther/src/trunk/gcc/cp/decl2.cc:1630 since it's not error-recovery it's still P1. Also crashes with namespace qualified_friend_no_match { void f(int); template void f(T*); struct X { friend void qualified_friend_no_match::f(double *); }; } which looks more valid to me, but I'm not a C++ expert (but clang++ 13 accepts it - but that also accepts the original testcase).
[Bug c++/107484] [13 Regression] ICE: Segmentation fault (in decls_match)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107484 Jason Merrill changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org Status|NEW |ASSIGNED
[Bug c++/107484] [13 Regression] ICE: Segmentation fault (in decls_match)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107484 Marek Polacek changed: What|Removed |Added Last reconfirmed||2022-11-11 Priority|P1 |P2 Ever confirmed|0 |1 CC||jason at gcc dot gnu.org, ||mpolacek at gcc dot gnu.org Status|UNCONFIRMED |NEW --- Comment #1 from Marek Polacek --- Invalid -> not P1. Started with r13-3550-g38a628f52cf0ff commit 38a628f52cf0ff5db6708578248484d50a50b366 Author: Jason Merrill Date: Fri Oct 28 10:45:06 2022 -0400 c++: apply friend attributes sooner
[Bug c++/107484] [13 Regression] ICE: Segmentation fault (in decls_match)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107484 Richard Biener changed: What|Removed |Added Priority|P3 |P1 Keywords||ice-checking
[Bug c++/107484] [13 Regression] ICE: Segmentation fault (in decls_match)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107484 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |13.0