[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 --- Comment #8 from GCC Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:1a4c47e10e8ba06f04de2d41a040ba1494843a01 commit r14-8634-g1a4c47e10e8ba06f04de2d41a040ba1494843a01 Author: Patrick Palka Date: Tue Jan 30 12:30:32 2024 -0500 c++: add original testcase [PR67898] The original testcase from this PR (fixed by r14-8291) seems rather different from the others, so let's add it to the testsuite. PR c++/67898 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/temp_default8.C: New test.
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 Jason Merrill changed: What|Removed |Added Target Milestone|12.0|14.0 --- Comment #7 from Jason Merrill --- Apparently I was confused, and my patch was also needed for the original testcase.
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org Status|ASSIGNED|RESOLVED Target Milestone|--- |12.0 Resolution|--- |FIXED --- Comment #6 from Jason Merrill --- The original testcase was indeed fixed by the patch for 61355, and Patrick's unrelated testcase in comment 4 is fixed by my commit just now. Closing as fixed in 12, but that only applies to the original testcase.
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 --- Comment #5 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:f1e5bf0d83ee4da81b6317c6d7f1278fe7eaa5a0 commit r14-8291-gf1e5bf0d83ee4da81b6317c6d7f1278fe7eaa5a0 Author: Jason Merrill Date: Wed Jan 17 17:29:33 2024 -0500 c++: alias template argument conversion [PR112632] We've had a problem with lost conversions to template parameter types for a while now; looking at this PR, it occurred to me that the problem is really with alias (and concept) templates, since we do substitution of dependent arguments into them in a way that we don't for other templates. And fixing that specific problem is a lot simpler than adding IMPLICIT_CONV_EXPR around all dependent template arguments the way I gave up on for 111357. The other part of the fix was changing tsubst_expr to actually call convert_nontype_argument instead of assuming it will eventually happen. I waffled about stripping the forced conversion when !force_conv vs. skipping them in iterative_hash_template_arg and template_args_equal (like we already do for some other conversions) and decided to go with the former, but that isn't a strong preference if it turns out to be somehow problematic. PR c++/112632 PR c++/112594 PR c++/111357 PR c++/104594 PR c++/67898 gcc/cp/ChangeLog: * cp-tree.h (IMPLICIT_CONV_EXPR_FORCED): New. * pt.cc (expand_integer_pack): Remove 111357 workaround. (maybe_convert_nontype_argument): Add force parm. (convert_template_argument): Handle alias template args specially. (tsubst_expr): Don't ignore IMPLICIT_CONV_EXPR_NONTYPE_ARG. * error.cc (dump_expr) [CASE_CONVERT]: Handle null optype. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/alias-decl-nontype1.C: New test. * g++.dg/cpp2a/concepts-narrowing1.C: New test. * g++.dg/cpp2a/nontype-class63.C: New test. * g++.dg/cpp2a/nontype-class63a.C: New test.
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 --- Comment #4 from Patrick Palka --- Related rejects-valid C++11 testcase: template struct A; template using B = A; using type = A; using type = B;// incorrectly resolves to A // instead of A
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 Patrick Palka changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Status|NEW |ASSIGNED CC||ppalka at gcc dot gnu.org
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 Bug 67898 depends on bug 61355, which changed state. Bug 61355 Summary: gcc doesn't normalize type in non-type template parameters https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61355 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 Andrew Pinski changed: What|Removed |Added Depends on||61355 --- Comment #3 from Andrew Pinski --- I suspect when PR 61355 is fixed, this one will be fixed but not 100% sure. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61355 [Bug 61355] gcc doesn't normalize type in non-type template parameters
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 --- Comment #2 from Richard Smith --- (Clang trunk now accepts both testcases.)
[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-06-18 CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed. clang 7 rejects it; newer clangs crash. icc accepts.