public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 Date: Mon, 25 May 2020 16:21:33 +0000 [thread overview] Message-ID: <bug-95317-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317 Bug ID: 95317 Summary: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fxcoudert at gcc dot gnu.org Target Milestone: --- ICE on valid C++14 code: $ cat b.C #include <iostream> template <int I> struct num { enum { value = I }; }; #define VALUEOFNUM(x) std::remove_reference_t<decltype(x)>::value template <typename TYPE> void foo() { auto test = [&](auto i) { enum { VALUE = VALUEOFNUM(i) }; std::cout << VALUE; }; test(num<0>()); test(num<1>()); } int main() { foo<void>(); } $ g++-9 b.C b.C: In instantiation of 'void foo() [with TYPE = void]': b.C:27:15: required from here b.C:18:22: internal compiler error: in tsubst_copy, at cp/pt.c:15649 18 | std::cout << VALUE; | ^~~~~ libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See <https://github.com/Homebrew/homebrew-core/issues> for instructions. Works fine with GCC up to version 6, but regresses at 7 and later.
next reply other threads:[~2020-05-25 16:21 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-25 16:21 fxcoudert at gcc dot gnu.org [this message] 2020-05-26 7:18 ` [Bug c++/95317] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org 2020-05-26 7:26 ` marxin at gcc dot gnu.org 2020-05-26 7:43 ` marxin at gcc dot gnu.org 2021-01-14 8:53 ` rguenth at gcc dot gnu.org 2021-04-05 19:39 ` cvs-commit at gcc dot gnu.org 2021-04-05 19:40 ` [Bug c++/95317] [8/9/10 " jason at gcc dot gnu.org 2021-04-26 16:29 ` mpolacek at gcc dot gnu.org 2021-05-14 9:53 ` [Bug c++/95317] [9/10 " jakub at gcc dot gnu.org 2021-06-01 8:17 ` rguenth at gcc dot gnu.org 2021-10-01 10:35 ` pinskia at gcc dot gnu.org 2022-05-27 9:42 ` [Bug c++/95317] [10 " rguenth at gcc dot gnu.org 2022-06-28 10:40 ` jakub at gcc dot gnu.org 2023-07-07 8:53 ` rguenth 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-95317-4@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).