public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/86193] Partial ordering of non-type template parameters with dependent types
       [not found] <bug-86193-4@http.gcc.gnu.org/bugzilla/>
@ 2022-04-22 17:03 ` ppalka at gcc dot gnu.org
  2022-04-26  1:49 ` [Bug c++/86193] [DR455] " cvs-commit at gcc dot gnu.org
  2022-04-28 15:39 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-04-22 17:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86193

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=105289

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
I noticed GCC 8, 9, and 10 accept the testcase in C++17 mode ever since
r8-1437-g3da557ec145823.

GCC 11 began rejecting the testcase in C++17 mode ever since
r11-6483-ge2e2f3f2c9400f.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/86193] [DR455] Partial ordering of non-type template parameters with dependent types
       [not found] <bug-86193-4@http.gcc.gnu.org/bugzilla/>
  2022-04-22 17:03 ` [Bug c++/86193] Partial ordering of non-type template parameters with dependent types ppalka at gcc dot gnu.org
@ 2022-04-26  1:49 ` cvs-commit at gcc dot gnu.org
  2022-04-28 15:39 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-26  1:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86193

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:288e4c64f6b4806358aabc9b99b2fba72bf04bf6

commit r12-8256-g288e4c64f6b4806358aabc9b99b2fba72bf04bf6
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Apr 25 21:46:56 2022 -0400

    c++: partial ordering with dependent NTTP type [PR105289]

    Here ever since r11-6483-ge2e2f3f2c9400f we're rejecting and crashing
    on (respectively) two testcases that we used to accept in C++17 mode
    since r8-1437-g3da557ec145823.  Both testcases declare a partial
    specialization of a primary template that has an NTTP with dependent
    type, and the validity of these partial specializations is unclear and
    the subject of PR86193 / CWG 455.

    So for now, this minimal patch just aims to fix the crash in the second
    testcase.  During deduction, when checking whether the type of an NTTP
    uses still-undeduced parameters, we were incorrectly substituting into
    the previously substituted type instead of into its original type.

    In passing this patch also downgrades the "not more specialized"
    diagnostic from a permerror to a pedwarn.

            PR c++/105289
            PR c++/86193

    gcc/cp/ChangeLog:

            * pt.cc (process_partial_specialization): Downgrade "partial
            specialization isn't more specialized" diagnostic from permerror
            to an on-by-default pedwarn.
            (unify) <case TEMPLATE_PARM_INDEX>: When substituting into the
            NTTP type a second time, use the original type not the
            substituted type.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/partial-specialization11.C: New test.
            * g++.dg/template/partial-specialization12.C: New test.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/86193] [DR455] Partial ordering of non-type template parameters with dependent types
       [not found] <bug-86193-4@http.gcc.gnu.org/bugzilla/>
  2022-04-22 17:03 ` [Bug c++/86193] Partial ordering of non-type template parameters with dependent types ppalka at gcc dot gnu.org
  2022-04-26  1:49 ` [Bug c++/86193] [DR455] " cvs-commit at gcc dot gnu.org
@ 2022-04-28 15:39 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-28 15:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86193

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:c4332c785c8e993104a4d76d86c737b51a636aee

commit r11-9945-gc4332c785c8e993104a4d76d86c737b51a636aee
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Apr 25 21:46:56 2022 -0400

    c++: partial ordering with dependent NTTP type [PR105289]

    Here ever since r11-6483-ge2e2f3f2c9400f we're rejecting and crashing
    on (respectively) two testcases that we used to accept in C++17 mode
    since r8-1437-g3da557ec145823.  Both testcases declare a partial
    specialization of a primary template that has an NTTP with dependent
    type, and the validity of these partial specializations is unclear and
    the subject of PR86193 / CWG 455.

    So for now, this minimal patch just aims to fix the crash in the second
    testcase.  During deduction, when checking whether the type of an NTTP
    uses still-undeduced parameters, we were incorrectly substituting into
    the previously substituted type instead of into its original type.

    In passing this patch also downgrades the "not more specialized"
    diagnostic from a permerror to a pedwarn.

            PR c++/105289
            PR c++/86193

    gcc/cp/ChangeLog:

            * pt.c (process_partial_specialization): Downgrade "partial
            specialization isn't more specialized" diagnostic from permerror
            to an on-by-default pedwarn.
            (unify) <case TEMPLATE_PARM_INDEX>: When substituting into the
            NTTP type a second time, use the original type not the
            substituted type.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/partial-specialization11.C: New test.
            * g++.dg/template/partial-specialization12.C: New test.

    (cherry picked from commit 288e4c64f6b4806358aabc9b99b2fba72bf04bf6)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-28 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-86193-4@http.gcc.gnu.org/bugzilla/>
2022-04-22 17:03 ` [Bug c++/86193] Partial ordering of non-type template parameters with dependent types ppalka at gcc dot gnu.org
2022-04-26  1:49 ` [Bug c++/86193] [DR455] " cvs-commit at gcc dot gnu.org
2022-04-28 15:39 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).