public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/108702] [13 Regression] ICE in get_partitioning_class, at symtab.cc:2096 since r13-4161-g32d16fe9d7e347bc Date: Wed, 08 Feb 2023 16:08:45 +0000 [thread overview] Message-ID: <bug-108702-4-veLzcUMa8g@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108702-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108702 --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Without -flto, the testcase can't be linked: ./cc1plus -quiet -std=c++23 stmtexpr19.C; g++ -o stmtexpr19{,.s} /usr/bin/ld: /tmp/ccUo7FRx.o:(.rodata+0x0): undefined reference to `setup()::inner' collect2: error: ld returned 1 exit status On the other side, when static constexpr vars are defined inside of constexpr functions or even consteval functions, it works ok: extern "C" void abort (); constexpr const int * foo () { static constexpr int a = 1; return &a; } consteval const int * bar () { static constexpr int a = 1; return &a; } [[gnu::noipa]] void baz (const int *x) { if (*x != 1) abort (); } int main () { constexpr const int *p = foo (); constexpr const int *q = bar (); baz (p); baz (q); if (p == q) abort (); }
next prev parent reply other threads:[~2023-02-08 16:08 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-07 18:36 [Bug ipa/108702] New: [13 Regression] ICE in get_partitioning_class, at symtab.cc:2096 asolokha at gmx dot com 2023-02-08 14:27 ` [Bug ipa/108702] [13 Regression] ICE in get_partitioning_class, at symtab.cc:2096 since r13-4161-g32d16fe9d7e347bc marxin at gcc dot gnu.org 2023-02-08 16:08 ` jakub at gcc dot gnu.org [this message] 2023-02-08 17:27 ` [Bug c++/108702] " jakub at gcc dot gnu.org 2023-03-04 8:55 ` cvs-commit at gcc dot gnu.org 2023-03-04 9:24 ` jakub 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-108702-4-veLzcUMa8g@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).