public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109978] New: ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda
@ 2023-05-26  6:22 oficsu at gmail dot com
  2023-05-26  6:38 ` [Bug c++/109978] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: oficsu at gmail dot com @ 2023-05-26  6:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109978
           Summary: ICE in tsubst, at cp/pt.cc:15869: alias template + c
                    array size deduction + lambda
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: oficsu at gmail dot com
  Target Milestone: ---

Created attachment 55162
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55162&action=edit
A minimal reproducible example

Lambdas in unevaluated contexts combined with an alias template to a c-style
array causes ICE when it's used to deduce the size of an array passed to a
function template, MRE:

template<auto N, auto = []{}>
using array = int[N];

template<auto N>
void foo(array<N>&&) {}

int main() {
  foo({1, 2, 3});
}

I've used a system GCC to generate the bug report, but other versions
(including trunk releases) affected also. See more on Compiler Explorer:
https://godbolt.org/z/zW6KETaYn

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

* [Bug c++/109978] ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda
  2023-05-26  6:22 [Bug c++/109978] New: ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda oficsu at gmail dot com
@ 2023-05-26  6:38 ` pinskia at gcc dot gnu.org
  2023-05-26  6:56 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-26  6:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am almost positive there is a dup of this one already too.

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

* [Bug c++/109978] ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda
  2023-05-26  6:22 [Bug c++/109978] New: ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda oficsu at gmail dot com
  2023-05-26  6:38 ` [Bug c++/109978] " pinskia at gcc dot gnu.org
@ 2023-05-26  6:56 ` pinskia at gcc dot gnu.org
  2023-05-26  6:57 ` pinskia at gcc dot gnu.org
  2024-04-15 22:22 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-26  6:56 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 98500.

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

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

* [Bug c++/109978] ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda
  2023-05-26  6:22 [Bug c++/109978] New: ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda oficsu at gmail dot com
  2023-05-26  6:38 ` [Bug c++/109978] " pinskia at gcc dot gnu.org
  2023-05-26  6:56 ` pinskia at gcc dot gnu.org
@ 2023-05-26  6:57 ` pinskia at gcc dot gnu.org
  2024-04-15 22:22 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-26  6:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Actually let's mark it as a dup of bug 102693.

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

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

* [Bug c++/109978] ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda
  2023-05-26  6:22 [Bug c++/109978] New: ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda oficsu at gmail dot com
                   ` (2 preceding siblings ...)
  2023-05-26  6:57 ` pinskia at gcc dot gnu.org
@ 2024-04-15 22:22 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-15 22:22 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
         Resolution|DUPLICATE                   |FIXED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed on the trunk for GCC 14 by the recent lambda template patches; that is it
is not a dup of bug 102693 after all.

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26  6:22 [Bug c++/109978] New: ICE in tsubst, at cp/pt.cc:15869: alias template + c array size deduction + lambda oficsu at gmail dot com
2023-05-26  6:38 ` [Bug c++/109978] " pinskia at gcc dot gnu.org
2023-05-26  6:56 ` pinskia at gcc dot gnu.org
2023-05-26  6:57 ` pinskia at gcc dot gnu.org
2024-04-15 22:22 ` pinskia 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).