public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99387] New: ICE when mixing CNTTP with deduction guides
@ 2021-03-04 14:37 omer.rosler at gmail dot com
  2021-03-04 15:07 ` [Bug c++/99387] " omer.rosler at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: omer.rosler at gmail dot com @ 2021-03-04 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99387
           Summary: ICE when mixing CNTTP with deduction guides
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: omer.rosler at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/n55re3

This code causes an ICE (while clang rejects it).
Changing line 21 to `template<auto templ>` causes a deduction failure (which is
wrong).

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

* [Bug c++/99387] ICE when mixing CNTTP with deduction guides
  2021-03-04 14:37 [Bug c++/99387] New: ICE when mixing CNTTP with deduction guides omer.rosler at gmail dot com
@ 2021-03-04 15:07 ` omer.rosler at gmail dot com
  2021-03-04 16:26 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: omer.rosler at gmail dot com @ 2021-03-04 15:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Omer Rosler <omer.rosler at gmail dot com> ---
Simplified example:

https://godbolt.org/z/b814o7

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

* [Bug c++/99387] ICE when mixing CNTTP with deduction guides
  2021-03-04 14:37 [Bug c++/99387] New: ICE when mixing CNTTP with deduction guides omer.rosler at gmail dot com
  2021-03-04 15:07 ` [Bug c++/99387] " omer.rosler at gmail dot com
@ 2021-03-04 16:26 ` mpolacek at gcc dot gnu.org
  2021-04-15 14:55 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-03-04 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-03-04
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org
           Keywords|                            |ice-on-valid-code

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.  The ICE started with r11-2015, and then r11-6816 turned it into
another ICE.

Never worked so not a regression.  But if the fix is for C++20-only paths, we
could still go and fix it.

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

* [Bug c++/99387] ICE when mixing CNTTP with deduction guides
  2021-03-04 14:37 [Bug c++/99387] New: ICE when mixing CNTTP with deduction guides omer.rosler at gmail dot com
  2021-03-04 15:07 ` [Bug c++/99387] " omer.rosler at gmail dot com
  2021-03-04 16:26 ` mpolacek at gcc dot gnu.org
@ 2021-04-15 14:55 ` ppalka at gcc dot gnu.org
  2024-02-06 14:56 ` mpolacek at gcc dot gnu.org
  2024-02-19 15:15 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-04-15 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Reduced:

template <auto> struct A { };
template <class> struct B { };

template<template <class> class Tmpl, Tmpl V>
void f (A<V>);

int main() {
  A<B<int>{}> x;
  f(x);
}

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

* [Bug c++/99387] ICE when mixing CNTTP with deduction guides
  2021-03-04 14:37 [Bug c++/99387] New: ICE when mixing CNTTP with deduction guides omer.rosler at gmail dot com
                   ` (2 preceding siblings ...)
  2021-04-15 14:55 ` ppalka at gcc dot gnu.org
@ 2024-02-06 14:56 ` mpolacek at gcc dot gnu.org
  2024-02-19 15:15 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-02-06 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This PR seems to have been fixed by r12-6773:

commit 09845ad7569bac27c3a1dc7b410d9df764d2ca06
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Jan 20 09:25:49 2022 -0500

    c++: CTAD inside alias template [PR91911, PR103672]

Note the Comment 1 test now compiles fine too.  clang++ rejects Comment 3 too.

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

* [Bug c++/99387] ICE when mixing CNTTP with deduction guides
  2021-03-04 14:37 [Bug c++/99387] New: ICE when mixing CNTTP with deduction guides omer.rosler at gmail dot com
                   ` (3 preceding siblings ...)
  2024-02-06 14:56 ` mpolacek at gcc dot gnu.org
@ 2024-02-19 15:15 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-02-19 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Let's call this a dup of PR91911 then.

*** This bug has been marked as a duplicate of bug 91911 ***

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

end of thread, other threads:[~2024-02-19 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 14:37 [Bug c++/99387] New: ICE when mixing CNTTP with deduction guides omer.rosler at gmail dot com
2021-03-04 15:07 ` [Bug c++/99387] " omer.rosler at gmail dot com
2021-03-04 16:26 ` mpolacek at gcc dot gnu.org
2021-04-15 14:55 ` ppalka at gcc dot gnu.org
2024-02-06 14:56 ` mpolacek at gcc dot gnu.org
2024-02-19 15:15 ` ppalka 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).