public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103885] New: ICE in capturing lambda for certain constexpr/auto combination
@ 2022-01-01 16:12 cbcode at gmail dot com
  2022-01-01 18:06 ` [Bug c++/103885] [9/10/11 Regression] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: cbcode at gmail dot com @ 2022-01-01 16:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103885
           Summary: ICE in capturing lambda for certain constexpr/auto
                    combination
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cbcode at gmail dot com
  Target Milestone: ---

ICE on the line indicated below.

void test() {
    constexpr int N = 1;
    constexpr auto a1 = [](auto){
        static_assert(N == 1); //OK
        return 2;
    }(3);
    constexpr auto a2 = [=](auto){
        static_assert(N == 1); //OK
        return 2;
    }(3);
    constexpr auto a3 = [&](int){
        static_assert(N == 1); //OK
        return 2;
    }(3);
    constexpr auto a4 = [&](auto){
        static_assert(N == 1); //ICE in tsubst_copy, at cp/pt.c:16780
        return 2;
    }(3);
}

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

end of thread, other threads:[~2022-05-04  0:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-01 16:12 [Bug c++/103885] New: ICE in capturing lambda for certain constexpr/auto combination cbcode at gmail dot com
2022-01-01 18:06 ` [Bug c++/103885] [9/10/11 Regression] " pinskia at gcc dot gnu.org
2022-01-01 18:13 ` pinskia at gcc dot gnu.org
2022-01-04 19:48 ` ppalka at gcc dot gnu.org
2022-04-07 10:09 ` rguenth at gcc dot gnu.org
2022-04-08 14:00 ` cvs-commit at gcc dot gnu.org
2022-05-04  0:23 ` [Bug c++/103885] [9/10 " 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).