public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sguelton at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98579] New: ICE: in output_constructor_regular_field, at varasm.c:5491 Date: Thu, 07 Jan 2021 10:02:27 +0000 [thread overview] Message-ID: <bug-98579-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98579 Bug ID: 98579 Summary: ICE: in output_constructor_regular_field, at varasm.c:5491 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sguelton at redhat dot com Target Milestone: --- The following code ``` #include <tuple> struct ComplexPart; template <typename PA, typename PB> struct FollowParser { constexpr FollowParser(PA pa, PB pb) : pa_{pa}, pb_{pb} {} const PA pa_; const PB pb_; }; template <typename PA, typename PB> inline constexpr FollowParser<PA, PB> operator/(PA pa, PB pb) { return FollowParser<PA, PB>{pa, pb}; } template <typename... PARSER> struct ApplyConstructor { constexpr ApplyConstructor(PARSER... p) : parsers_{p...} {} const std::tuple<PARSER...> parsers_; }; template <typename... PARSER> constexpr ApplyConstructor<PARSER...> construct(PARSER... p) { return ApplyConstructor<PARSER...>{p...}; } template <typename A> struct Parser { constexpr Parser() {} }; auto tmp = construct(Parser<ComplexPart>{} / ",", Parser<ComplexPart>{}); ``` compiled with ``` g++ -std=c++17 -c F.cpp ``` raises an ICE. Reproducer on godbolt, using trunk gcc: https://gcc.godbolt.org/z/M3r15z Possible duplicate: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98463 but the example look different enough.
next reply other threads:[~2021-01-07 10:02 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-07 10:02 sguelton at redhat dot com [this message] 2021-01-07 10:55 ` [Bug c++/98579] [11 Regression] ICE: in output_constructor_regular_field, at varasm.c:5491 since r11-2720-g91e6226f880b0482 marxin at gcc dot gnu.org 2021-01-07 13:22 ` rguenth at gcc dot gnu.org 2021-01-14 11:19 ` rguenth at gcc dot gnu.org 2021-01-19 12:52 ` 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-98579-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).