[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 Patrick Palka changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #10 from Patrick Palka --- Fixed for GCC 13.3 / 14.
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 --- Comment #9 from CVS Commits --- The releases/gcc-13 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:8e811edea309b2097e23cde48ee6fb6467a9094d commit r13-7614-g8e811edea309b2097e23cde48ee6fb6467a9094d Author: Patrick Palka Date: Wed Jul 26 16:52:13 2023 -0400 c++: unifying REAL_CSTs [PR110809] This teaches unify how to compare two REAL_CSTs. PR c++/110809 gcc/cp/ChangeLog: * pt.cc (unify) : Generalize to handle REAL_CST as well. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nontype-float3.C: New test. (cherry picked from commit 744e1f35266dbd6b6fb95c7e8422562815f8b56f)
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 Patrick Palka changed: What|Removed |Added Target Milestone|--- |13.3 --- Comment #8 from Patrick Palka --- Fixed on trunk so far.
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 --- Comment #7 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:744e1f35266dbd6b6fb95c7e8422562815f8b56f commit r14-2806-g744e1f35266dbd6b6fb95c7e8422562815f8b56f Author: Patrick Palka Date: Wed Jul 26 16:52:13 2023 -0400 c++: unifying REAL_CSTs [PR110809] This teaches unify how to compare two REAL_CSTs. PR c++/110809 gcc/cp/ChangeLog: * pt.cc (unify) : Generalize to handle REAL_CST as well. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nontype-float3.C: New test.
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 --- Comment #6 from Andrew Pinski --- (In reply to Ed Catmur from comment #5) > The original code is valid. A reduced valid case would be: > ``` > template struct S {}; > template struct bucket {}; > template > int find_indices_impl(bucket const &); > struct HashTable : bucket, 1>, bucket, 2> {}; > auto t = find_indices_impl>(HashTable{}); > ``` Oh yes and yes the above looks like the original code even. It is definitely trying to match bucket, 2> base class with bucket, i> though and it is ICEing there.
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 --- Comment #5 from Ed Catmur --- The original code is valid. A reduced valid case would be: ``` template struct S {}; template struct bucket {}; template int find_indices_impl(bucket const &); struct HashTable : bucket, 1>, bucket, 2> {}; auto t = find_indices_impl>(HashTable{}); ```
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 --- Comment #4 from Andrew Pinski --- Note if we do: ``` struct A{}; struct B{}; template struct S {}; template struct bucket {}; template int find_indices_impl(bucket const &); using HashTable = bucket, 1>; auto t = find_indices_impl>(HashTable{}); ``` GCC correctly rejects the above but if we replace B{} with a floating point value, we get the ICE (but not if we replace A{}). Maybe that will give an hint of what is going wrong in the end.
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 --- Comment #3 from Andrew Pinski --- I reduced it to an invalid code (I don't know if the original was valid or not): ``` template struct S {}; template struct bucket {}; template int find_indices_impl(bucket const &); using HashTable = bucket, 1>; auto t = find_indices_impl>(HashTable{}); ``` If I remove the i template argument, GCC correctly rejects the above. If I change 1.0 and 2.0 to the same value, GCC accepts the code correctly. Note clang does not support double as a non-type template argument (yet).
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 --- Comment #2 from Andrew Pinski --- Reducing ...
[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 Marek Polacek changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC||mpolacek at gcc dot gnu.org Last reconfirmed||2023-07-25 --- Comment #1 from Marek Polacek --- Confirmed. Even 11 ICEs; 10 gives errors.