public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 Date: Mon, 27 Mar 2023 19:00:06 +0000 [thread overview] Message-ID: <bug-109300-4-rMHj9uWCwR@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109300-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-03-27 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords|ice-on-valid-code |ice-on-invalid-code, | |needs-bisection --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note I think this is invalid code. With an instantation, GCC 12 (and before) does reject it: ``` template<typename T> auto x = [](){ x<int>(); }; auto y = x<int>; ``` ``` <source>: In instantiation of 'auto x<int>': <source>:3:10: required from here <source>:2:16: error: use of 'x<int>' before deduction of 'auto' 2 | auto x = [](){ x<int>(); }; | ^~~~~~ <source>:2:6: error: 'x<int>' has incomplete type 2 | auto x = [](){ x<int>(); }; | ^ <source>:2:22: error: invalid use of 'auto' 2 | auto x = [](){ x<int>(); }; | ~~~~~~^~ ``` Note clang rejects it even without an instantation.
next prev parent reply other threads:[~2023-03-27 19:00 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-27 18:36 [Bug c++/109300] New: " gscfq@t-online.de 2023-03-27 19:00 ` pinskia at gcc dot gnu.org [this message] 2023-03-27 20:46 ` [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616 marxin at gcc dot gnu.org 2023-03-27 20:48 ` mpolacek at gcc dot gnu.org 2023-03-27 23:45 ` ppalka at gcc dot gnu.org 2023-03-28 7:11 ` rguenth at gcc dot gnu.org 2023-04-03 22:50 ` cvs-commit at gcc dot gnu.org 2023-04-03 22:51 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109300-4-rMHj9uWCwR@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).