public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99180] New: ICE with alias template and empty parameter pack
@ 2021-02-20 15:37 szilardszaloki at gmail dot com
  2021-02-22  9:51 ` [Bug c++/99180] " marxin at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: szilardszaloki at gmail dot com @ 2021-02-20 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99180
           Summary: ICE with alias template and empty parameter pack
           Product: gcc
           Version: 11.0
               URL: https://godbolt.org/z/qrGn34
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: szilardszaloki at gmail dot com
  Target Milestone: ---

template <bool, typename... Ts>
struct A {
    A(Ts...) {}
};

template <typename... Ts>
using B = A<false, Ts...>;

template <typename... Ts>
using C = A<true, Ts...>;

template <typename... Ts>
A(Ts...) -> C<Ts...>;

int main(int const, char const* const []) {
    B{};
    return 0;
}

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

* [Bug c++/99180] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
@ 2021-02-22  9:51 ` marxin at gcc dot gnu.org
  2021-02-23 12:08 ` [Bug c++/99180] [10/11 Regression] " rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-22  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-02-22
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
With -std=c++17, it started with r10-5020-g1a291106384cabc7.
Is it really a valid test-case?

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

* [Bug c++/99180] [10/11 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
  2021-02-22  9:51 ` [Bug c++/99180] " marxin at gcc dot gnu.org
@ 2021-02-23 12:08 ` rguenth at gcc dot gnu.org
  2021-02-26 12:54 ` rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-23 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.3
           Keywords|ice-on-valid-code           |ice-on-invalid-code
             Status|WAITING                     |NEW

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
clang rejects it

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

* [Bug c++/99180] [10/11 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
  2021-02-22  9:51 ` [Bug c++/99180] " marxin at gcc dot gnu.org
  2021-02-23 12:08 ` [Bug c++/99180] [10/11 Regression] " rguenth at gcc dot gnu.org
@ 2021-02-26 12:54 ` rguenth at gcc dot gnu.org
  2021-03-03 20:32 ` mpolacek at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-26 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug c++/99180] [10/11 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (2 preceding siblings ...)
  2021-02-26 12:54 ` rguenth at gcc dot gnu.org
@ 2021-03-03 20:32 ` mpolacek at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-03-03 20:32 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Probably a dup of 99118 which itself is likely a dup.

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

* [Bug c++/99180] [10/11 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (3 preceding siblings ...)
  2021-03-03 20:32 ` mpolacek at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2021-04-09 21:09 ` jason at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.3                        |10.4

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

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

* [Bug c++/99180] [10/11 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (4 preceding siblings ...)
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2021-04-09 21:09 ` jason at gcc dot gnu.org
  2021-04-10  4:07 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-09 21:09 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

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

* [Bug c++/99180] [10/11 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (5 preceding siblings ...)
  2021-04-09 21:09 ` jason at gcc dot gnu.org
@ 2021-04-10  4:07 ` cvs-commit at gcc dot gnu.org
  2021-04-10  4:08 ` [Bug c++/99180] [10 " jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-10  4:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:1a19d334ce493ec2ce2daeac74beef63fd67e2bc

commit r11-8104-g1a19d334ce493ec2ce2daeac74beef63fd67e2bc
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Apr 9 18:02:38 2021 -0400

    c++: deduction guide using alias [PR99180]

    alias_ctad_tweaks was expecting that all deduction guides for the class
    would be suitable for deduction from the alias definition; in this case,
the
    deduction guide uses 'true' and the alias B uses 'false', so deduction
    fails.  But that's OK, we just don't use that deduction guide.  I also
    noticed that we were giving up on deduction entirely if substitution failed
    for some guide; we should only give up on that particular deduction guide.

    We ought to give a better diagnostic about this case when deduction fails,
    but that can wait.

    gcc/cp/ChangeLog:

            PR c++/99180
            PR c++/93295
            PR c++/93867
            PR c++/99118
            PR c++/96873
            * pt.c (alias_ctad_tweaks): Handle failure better.

    gcc/testsuite/ChangeLog:

            PR c++/99180
            PR c++/93295
            PR c++/93867
            PR c++/95486
            * g++.dg/cpp2a/class-deduction-alias5.C: New test.
            * g++.dg/cpp2a/class-deduction-alias6.C: New test.
            * g++.dg/cpp2a/class-deduction-alias7.C: New test.
            * g++.dg/cpp2a/class-deduction-alias8.C: New test.

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

* [Bug c++/99180] [10 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (6 preceding siblings ...)
  2021-04-10  4:07 ` cvs-commit at gcc dot gnu.org
@ 2021-04-10  4:08 ` jason at gcc dot gnu.org
  2021-04-10  4:17 ` jason at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-10  4:08 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |11.0
            Summary|[10/11 Regression] ICE with |[10 Regression] ICE with
                   |alias template and empty    |alias template and empty
                   |parameter pack              |parameter pack

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11 so far.

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

* [Bug c++/99180] [10 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (7 preceding siblings ...)
  2021-04-10  4:08 ` [Bug c++/99180] [10 " jason at gcc dot gnu.org
@ 2021-04-10  4:17 ` jason at gcc dot gnu.org
  2021-04-14 14:57 ` ppalka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-10  4:17 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ensadc at mailnesia dot com

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
*** Bug 93295 has been marked as a duplicate of this bug. ***

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

* [Bug c++/99180] [10 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (8 preceding siblings ...)
  2021-04-10  4:17 ` jason at gcc dot gnu.org
@ 2021-04-14 14:57 ` ppalka at gcc dot gnu.org
  2021-04-14 14:58 ` ppalka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-04-14 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pacoarjonilla at yahoo dot es

--- Comment #8 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 94560 has been marked as a duplicate of this bug. ***

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

* [Bug c++/99180] [10 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (9 preceding siblings ...)
  2021-04-14 14:57 ` ppalka at gcc dot gnu.org
@ 2021-04-14 14:58 ` ppalka at gcc dot gnu.org
  2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-04-14 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu.org

--- Comment #9 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 94691 has been marked as a duplicate of this bug. ***

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

* [Bug c++/99180] [10 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (10 preceding siblings ...)
  2021-04-14 14:58 ` ppalka at gcc dot gnu.org
@ 2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
  2022-06-28 10:43 ` jakub at gcc dot gnu.org
  2023-07-07  9:28 ` rguenth at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-20 21:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:92e9b2a995f718f1c2ab1cd0840b439c24d3535f

commit r10-9852-g92e9b2a995f718f1c2ab1cd0840b439c24d3535f
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Apr 9 18:02:38 2021 -0400

    c++: deduction guide using alias [PR99180]

    alias_ctad_tweaks was expecting that all deduction guides for the class
    would be suitable for deduction from the alias definition; in this case,
the
    deduction guide uses 'true' and the alias B uses 'false', so deduction
    fails.  But that's OK, we just don't use that deduction guide.  I also
    noticed that we were giving up on deduction entirely if substitution failed
    for some guide; we should only give up on that particular deduction guide.

    We ought to give a better diagnostic about this case when deduction fails,
    but that can wait.

    gcc/cp/ChangeLog:

            PR c++/99180
            PR c++/93295
            PR c++/93867
            PR c++/99118
            PR c++/96873
            * pt.c (alias_ctad_tweaks): Handle failure better.

    gcc/testsuite/ChangeLog:

            PR c++/99180
            PR c++/93295
            PR c++/93867
            PR c++/95486
            * g++.dg/cpp2a/class-deduction-alias5.C: New test.
            * g++.dg/cpp2a/class-deduction-alias6.C: New test.
            * g++.dg/cpp2a/class-deduction-alias7.C: New test.
            * g++.dg/cpp2a/class-deduction-alias8.C: New test.

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

* [Bug c++/99180] [10 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (11 preceding siblings ...)
  2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
@ 2022-06-28 10:43 ` jakub at gcc dot gnu.org
  2023-07-07  9:28 ` rguenth at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug c++/99180] [10 Regression] ICE with alias template and empty parameter pack
  2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
                   ` (12 preceding siblings ...)
  2022-06-28 10:43 ` jakub at gcc dot gnu.org
@ 2023-07-07  9:28 ` rguenth at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Known to work|                            |10.4.0
   Target Milestone|10.5                        |10.4
             Status|ASSIGNED                    |RESOLVED
      Known to fail|                            |10.3.0

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 10.4.

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

end of thread, other threads:[~2023-07-07  9:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 15:37 [Bug c++/99180] New: ICE with alias template and empty parameter pack szilardszaloki at gmail dot com
2021-02-22  9:51 ` [Bug c++/99180] " marxin at gcc dot gnu.org
2021-02-23 12:08 ` [Bug c++/99180] [10/11 Regression] " rguenth at gcc dot gnu.org
2021-02-26 12:54 ` rguenth at gcc dot gnu.org
2021-03-03 20:32 ` mpolacek at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-09 21:09 ` jason at gcc dot gnu.org
2021-04-10  4:07 ` cvs-commit at gcc dot gnu.org
2021-04-10  4:08 ` [Bug c++/99180] [10 " jason at gcc dot gnu.org
2021-04-10  4:17 ` jason at gcc dot gnu.org
2021-04-14 14:57 ` ppalka at gcc dot gnu.org
2021-04-14 14:58 ` ppalka at gcc dot gnu.org
2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07  9:28 ` rguenth 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).